Discuss / Git / 推送不成功,出现404错误

推送不成功,出现404错误

Topic source

$ git push -u gitee master

Access denied: 404 not found!

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

已确定公钥添加成功、和远程库已绑定,请问这是怎么回事呢老师?

廖雪峰

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

git remote -v 查看远程库地址

是git协议还是https协议

自己一步一步排错

老师,查询结果是这样的。

$ git remote -v

gitee   git@gitee.com:halo_frrrank/LearnGit.git (fetch)

gitee   git@gitee.com:halo_frrrank/LearnGit.git (push)

廖雪峰

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

你的本地私钥/公钥放对地方了吗?是不是本地读的key和远程设置的key根本不是同一个

位置是放在默认地址的:C:\Users\Administrator\.ssh

廖雪峰

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

感觉你的主目录不是Administrator

老师您好,我知道问题在哪了,是我在学习远程库的时候没学好,导致本地库和远程库不匹配导致的,新建一个本地库然后pull下来后再push就好了。

您好,请问您怎么处理的这个问题,我ssh公钥添加完毕了,然后也绑定了远程库,也是报这个错误,我新建了一个本地库和远程库,重新操作了一遍,还是报这个错误


  • 1

Reply