Git https://存储库没有找到,尽管它存在 [英] Git https:// repository not found though it exists
问题描述
我在github上有一个私人回购站。
我尝试更换遥控器,但无法再继续播放。
ls-remote https://github.com/xxxxx/xxxxx.git
给了我这个
remote:找不到存储库。 '找不到
- https://github.com/xxxxx/xxxxx.git/ >
- 我检查了拼写,结果正确。
- 我可以在浏览器中打开网址
- 我
- 我可以通过https克隆所有其他回购
- 我使用
移除原产地git remove出处 https://github.com/xxxx/xxxxx.git - 将其重新添加到
git添加源 https:// github。 com / xxxxx / xxxxx.git - 我做了一个
git remote set-url来源 https://github.com/xxxxx/xxxxx。 git
我将git从1.9.5升级到2.2.1,看看它是否有帮助
升级后,我在存储库上执行了一个新的ls-remote,并要求接受新证书。我没有。
这并没有解决问题。
对 SSH URL 尽管完美地工作
所以我通过添加SSH URL作为远程来源解决了问题
为什么https:// url是未找到让我感到困惑。
任何人有任何想法?
我认为,因为它是一个私人回购,它似乎不存在用于匿名访问。如果您使用https url,它将发送匿名请求,而ssh url使用您的ssh证书和私钥建立连接。
不确定如何使它与github正常工作,但请尝试在URL中指定一个用户名,例如 ls-remote https://youusername@github.com/xxxxx/xxxxx.git
。
I have a private repo on github. It's location was changed.
I tried changing the remote but I wasn't able to push anymore.
ls-remote https://github.com/xxxxx/xxxxx.git
gave me this
remote: Repository not found.
fatal: repository 'https://github.com/xxxxx/xxxxx.git/' not found
- I checked the spelling and it was correct.
- I was able to open the url in the browser
- I have sufficient rights on the repo.
- I could clone every other repo by https
- I removed origin with
git remove origin https://github.com/xxxx/xxxxx.git - re-added it with
git add origin https://github.com/xxxxx/xxxxx.git - I did a
git remote set-url origin https://github.com/xxxxx/xxxxx.git
I upgraded git from 1.9.5 to 2.2.1 to see if it would help
After the upgrade I did a new ls-remote on the repository and it asked to accept a new certificate. I did.
This didn't remove the problem
Doing a ls-remote on the SSH URL url though works perfectly So I fixed the problem by adding the SSH URL as remote origin
Why the https:// url is Not found keeps me puzzled. Anyone has any idea?
I think that as it is a private repo, it appears as non-existent for anonymous access. If you use https url, it sends anonymous request, while ssh url uses your ssh credentials and private key to establish connection.
Not sure how to make it work properly with github, but try specifying a username in the url such as ls-remote https://youusername@github.com/xxxxx/xxxxx.git
.
Here some clues, I believe: Is there a way to skip password typing when using https:// on GitHub?
这篇关于Git https://存储库没有找到,尽管它存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!