Discuss / Git / push 时报错

push 时报错

Topic source

使用 $ git push -u origin main 后提示:

ssh: connect to host 126.com port 22: Connection refused. fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.

请问这要怎么解决啊 看到评论说 -f   和push 到 main 中,试了一下都没效果啊。

昂予

#2 Created at ... [Delete] [Delete and Lock User]

git问题error: remote origin already exists.

哥们儿可以看下这位兄弟写的文章,可以解决 git问题error: remote origin already exists.

孑城

#3 Created at ... [Delete] [Delete and Lock User]

问题解决了吗?我是出现Permission denied.

git push -u origin master之后要输密码?我输得就是我github的密码,但总输不对

重新执行命令:

git remote add origin git@github.com:michaelliao/learngit.git

如果提示已经存在,执行:

git remote -v 

git remove origin

重新执行命令第一条命令,关联远程库

(我出错是因为repo-name打错了)

yzj

#5 Created at ... [Delete] [Delete and Lock User]

二楼的文章确实可以解决问题!

MoCuishle

#6 Created at ... [Delete] [Delete and Lock User]

很有帮助!试了三楼的方法也解决问题了,感谢


  • 1

Reply