我正在使用mobaxterm本地终端。我想使用git命令。它的工作除了凭证:
➤ git pull
ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我尝试过设置凭据,但没有任何作用:
[05/03/2018 08:03.49] ~/dsf
[sylvain.auger-leger.vbw-sau-13] ➤ git git config --global credential.helper cache
✔
[05/03/2018 08:04.29] ~/dsf
[sylvain.auger-leger.vbw-sau-13] ➤ git config --global credential.helper cache
✔
[05/03/2018 08:04.30] ~/dsf
[sylvain.auger-leger.vbw-sau-13] ➤ git config --global credential.helper 'store --file ~/.my-credentials'
✔
答案 0 :(得分:0)
git凭证帮助程序有助于https凭据缓存,而不是ssh。
首先检查您的远程URL是否为SSH:
git remote -v
如果是(ssh://
或git@xxx:user/repo
)则:
~/.ssh
或切换为https(如果可能):
git remote set-url origin https://url/remote/repo