【问题标题】:How do I commit changes to a repository while I am 1 behind and 2 ahead?当我落后 1 和 2 领先时,如何将更改提交到存储库?
【发布时间】:2020-04-25 11:55:19
【问题描述】:

所以我在这个 GitHub 存储库上落后 1 和 2 领先。
当我不得不解决 1 背后的问题时,它给了我这个输出:

git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我不太确定这意味着什么,并希望尽快解决此问题并将一些文件上传到存储库。
我是 GitHub 和 SourceTree 的初学者。

【问题讨论】:

    标签: github repository atlassian-sourcetree git-commit git-pull


    【解决方案1】:

    这意味着 SourceTree 使用 SSH 的方式无法在 GitHub 上对您进行身份验证。

    首先检查在命令行中ssh -T git@github.com 是否有效:参见“Testing your SSH connection”。

    然后检查 sourceTree 设置:作为shown here,我建议使用 OpenSSH 客户端,而不是 putty 客户端(假设您使用 ssh-keygen -t rsa -P "" -m PEM 生成您的 ssh 私钥/公钥对,而不是 putty,或者您不在 Windows 上)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-05
      • 1970-01-01
      • 1970-01-01
      • 2015-09-06
      • 2022-10-17
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      相关资源
      最近更新 更多