Mac git push偶现无法提交代码。

Posted 安果移不动

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mac git push偶现无法提交代码。相关的知识,希望对你有一定的参考价值。


Connection closed by 104.xxx.xxx.x port 22
fatal: Could not read from remote repository.

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

重新删除ssh 然后重新生成 按照全部步骤走走一遍  不需要设置代理。

就重新生成ssh并添加。但是切记 如果没有密码要完成步骤2

按照官方文档完成第二步

Step 2. Add the key to the ssh-agent

If you don't want to type your password each time you use the key, you'll need to add it to the ssh-agent.

  1. To start the agent, run the following:

    $ eval $(ssh-agent)
    Agent pid 9700

  2. Enter ssh-add followed by the path to the private key file:

    $ ssh-add ~/.ssh/<private_key_file>

Set up an SSH key | Bitbucket Cloud | Atlassian Support

是的。。就Bitbucket需要完成第二步骤 类似gitee、git 我就没完成这两部也可以正常提交

以上是关于Mac git push偶现无法提交代码。的主要内容,如果未能解决你的问题,请参考以下文章

git push代码到github被拒绝是怎么回事

在使用Git提交代码的时候犯了个低级错误

git 提交到本地但未push到远端的代码

git 如何撤销已push的代码

如何禁止GitLab分支被push

gitlab远程仓库地址改变,导致本地无法git push代码解决方案