我有一个非常奇怪的问题与git和github。当我试着推的时候,我得到:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我添加了遥控器:
git remote add origin git@github.com:account-name/repo-name.git
什么好主意吗?
我有一个非常奇怪的问题与git和github。当我试着推的时候,我得到:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我添加了遥控器:
git remote add origin git@github.com:account-name/repo-name.git
什么好主意吗?
当前回答
我得到了同样的错误,因为我改变了我的github用户名,然后我这样做:
git remote -v
然后:
git remote set-url newname newurl
git push -u origin master
这次我能够推送到存储库。 我希望这能有所帮助。
其他回答
所以对我来说,我的密码有一个'(勾),PhpStorm在发送git推送之前删除了这个字符:
在这个例子中,我的密码是_pa ' ' ssword_
Phpstorm将输出以下内容:
https://_username_:_password_@github.com/_username_/repo.git
而不是
https://_username_ _pa“ssword_@github.com/_username_/repo.git
将密码更改为不使用'字符的密码。工作! !
我的一个Github库也有同样的问题。
方法:
使用SSH而不是HTTPS,然后推/拉开始工作正常。
如果您包括您的用户名和回购名称,我们可以合理地帮助您,目前我们没有理由认为回购确实存在。
此外,如果回购是私有的,并且您无法访问它,github将返回“不存在”,以避免披露私有回购的存在。
编辑:如果你不能克隆它,因为它说它不存在,它是私有的,这是因为你没有发送身份验证。确保您的公钥已添加到密匙环,或暂时使用HTTP基本身份验证。
检查是否具有读写权限。
Git错误消息具有误导性。我也遇到过类似的问题。我被添加到一个现有的项目中。我克隆了它并提交了一个本地更改。我去推,得到了ERROR: Repository not found。错误消息。
将我添加到项目的人给了我对存储库的只读访问权。他们做出了改变,我得以推动。
我得到这个错误(但之前正在工作)。我的问题是缺少与Github帐户绑定的ssh密钥。您可以使用ssh-add -l检查当前的ssh密钥。
如果你的钥匙丢失了,你可以用
ssh-add ~/.ssh/your_key