繁体   English   中英

Windows Git-bash致命:无法从远程存储库读取。 当推SSH

[英]Windows Git-bash fatal: Could not read from remote repository. when pushing through ssh

我正在使用Windows Git-bash使用ssh(不是https)将其推送到我的存储库。 我已按照此页面中的说明进行操作

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

$ ssh-keygen -t rsa -b 4096 -C "barghouti_since88@hotmail.com"
$ ssh-add ~/.ssh/id_rsa

然后将密钥复制到〜/ .ssh / id_rsa中,并按照以下设置将其复制到github帐户中的ssh密钥中

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

但是现在当我尝试推动使用

$git add file
$git commit -m "adding file"
$git push

我得到以下

FATAL ERROR: Couldn't agree a key exchange algorithm (available: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521)
fatal: Could not read from remote repository.

请确保您具有正确的访问权限,并且存储库存在。

您可以检查以下几种可能性:

  • 您是否使用“ https”而不是“ git”“ git clone”存储库? 如果要使用ssh进行git push,则还需要使用ssh进行克隆。
  • 您的Windows版Git是否足够新? GitHub偶尔会删除对较旧,较弱的加密货币的支持,并且您的软件需要与服务器的算法匹配,在这种情况下,错误消息不会匹配该算法。
  • 您是否使用与git相同的ssh软件? Git for Windows附带了ssh,但是ssh也可以单独安装,例如作为OpenSSH单独安装,或包含在腻子中。 将“ where ssh-keygen”的输出与环境变量GIT_SSH进行比较。

希望这可以帮助

暂无
暂无

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

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