¿Cómo autenticar Github en Ubuntu? git: 'credential-netrc' no es un comando git

Oct 22 2020

Leí esto y verifiqué mis credenciales, pero todavía no puedo hacer push.

 git push --set-upstream origin master
git: 'credential-netrc' is not a git command. See 'git --help'.

Lo que he hecho hasta ahora:

  1. Creado ~ / .netrc
  2. gpg --gen-key
  3. gpg -e -r [email protected] ~/.netrc
  4. Asistente de creación agregado al hacer frente al repositorio de Perl a~/.local/bin/git-credential-netrc
  5. Configurar Git

git config --global credential.helper "netrc -f ~ / .netrc.gpg -v"

  1. Editeed ~ .profile según este enlace.

git config muestra

file:/home/milenko/.gitconfig   [email protected]
file:/home/milenko/.gitconfig   credential.helper=netrc -f ~/.netrc.gpg -v
file:.git/config        core.repositoryformatversion=0
file:.git/config        core.filemode=true
file:.git/config        core.bare=false
file:.git/config        core.logallrefupdates=true
file:.git/config        remote.origin.url=https://github.com/MilenkoM/blog_mongo
file:.git/config        remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

Parece que no se reconoce mi ayudante de creación. ¿Por qué?

Respuestas

1 VonC Oct 22 2020 at 18:12

Debe asegurarse de que:

  • ~/.local/bin/ está en tu $ PATH
  • git-credential-netrces ejecutable ( chmod 755 ~/.local/bin/git-credential-netrc)

Luego puede probar si git credential-netrc(tenga en cuenta el espacio) responderá algo (incluso si hay errores)