简体   繁体   English

Mobaxterm终端中的Git凭证

[英]Git credential in Mobaxterm terminal

I am using mobaxterm local terminal. 我正在使用mobaxterm本地终端。 I want to use git commands. 我想使用git命令。 It's working except for credentials: 除凭据外,它正在工作:

 ➤ 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.

I have try settings credential, but nothing works: 我有尝试设置凭据,但没有任何效果:

    [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'
                                                                                                                                                                                                        ✔

A git credential helper would help for https credential caching, not ssh. git凭证帮助程序将帮助https凭证缓存,而不是ssh。

Check first if your remote URL is an SSH one: 首先检查您的远程URL是否为SSH:

git remote -v

If it is ( ssh:// or git@xxx:user/repo ) then: 如果是( ssh://git@xxx:user/repo ),则:

  • check if you have a public/private ssh key in ~/.ssh 检查~/.ssh是否有公共/私有ssh密钥
  • or switch to https if possible: 或尽可能切换到https:

     git remote set-url origin https://url/remote/repo 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM