gpt4 book ai didi

linux - Mobaxterm 终端中的 Git 凭据

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:17:23 24 4
gpt4 key购买 nike

我正在使用 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 中是否有公钥/私钥>
  • 或者如果可能切换到 https:

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

关于linux - Mobaxterm 终端中的 Git 凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49100532/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com