簡體   English   中英

Mobaxterm終端中的Git憑證

[英]Git credential in Mobaxterm terminal

我正在使用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'
                                                                                                                                                                                                        ✔

git憑證幫助程序將幫助https憑證緩存,而不是ssh。

首先檢查您的遠程URL是否為SSH:

git remote -v

如果是( ssh://git@xxx:user/repo ),則:

  • 檢查~/.ssh是否有公共/私有ssh密鑰
  • 或盡可能切換到https:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM