git push推送出现问题

由于自己的一系列错误操作,在推送的时候出现以下问题
202204122346502022-04-12

简单检查了,发现已在github保存公钥,基本的git设置也都进行了。
之后发现git-agent未开启(一般在windows上不建议使用git-agent具体见这里,但笔者是按github doc来配置索性就使用了)
202204122354082022-04-12

之后使用ssh-add将把专用密钥添加到ssh-agent的高速缓存中
202204122357292022-04-12
出现问题,无法连接到git-agent
解决方法:需要ssh-agent启动bash,或者说把bash挂到ssh-agent下面。

ssh-agent bash --login -i

具体原因可以见这里。之后就可完成添加了。

之后进行测试12022-04-13

之后如果遇到

$ git remote add origin git@github.com:lut/EvolutionApp.git
fatal: remote origin already exists.

$ git push -u origin master
fatal: 'EvolutionApp' does not appear to be a git repository
fatal: Could not read from remote repository.

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

可以参看这里

posted @ 2022-04-13 00:11  小约翰氪憨  阅读(100)  评论(0)    收藏  举报