我有一个非常奇怪的问题与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
什么好主意吗?
当前回答
SSH访问检查方法如下:
ssh -T git@github.com
这个问题是因为我没有在存储库中添加SSH上的人响应,阅读更多关于SSH link-1, link-2的信息。
其他回答
我得到了同样的错误
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我在Github上创建了存储库,并在本地克隆了它。
我可以通过打开.git/config并删除[remote "origin"]部分来解决。
[remote "origin"]
url = git@github.com:alexagui/my_project.git
fetch = +refs/heads/*:refs/remotes/origin/*
然后我运行以下程序(再次)
git remote add origin git@github.com:alexagui/my_project.git
git push -u origin master
这一次我可以推到存储库。
我也有同样的问题。
我解决了把我的gitlab用户名前缀到gitlab.com url的问题,就像这样: 之前: https://gitlab.com/my_gitlab_user/myrepo.git 后: https://my_gitlab_user@gitlab.com/my_gitlab_user/myrepo.git 在这种情况下,将再次要求凭据,这就完成了!
我也遇到过类似的问题。错误的凭据缓存在OS X的密钥链中。
查看:https://help.github.com/articles/updating-credentials-from-the-osx-keychain
我也有同样的问题。试试下面的方法: 1. 修改密钥链访问在Mac的git凭证解决了我的问题。 2. 重置原始url
git remote rm origin
git remote add origin git@github.com:account-name/repo-name.git
在使用MacBook Pro时遇到了同样的问题。
当我尝试克隆一个存储库时,我得到以下错误:
git clone https://github.com/mytech/mytech_frontend.git
Cloning into 'mytech_frontend'...
remote: Repository not found.
fatal: repository 'https://github.com/mytech/mytech_frontend.git/' not found
以下是我的解决方法:
问题是我已经在我的电脑上设置了我的个人GitHub帐户,我试图克隆的存储库是个人的私人存储库(而不是团队帐户)。
我所要做的就是通过进入项目设置,将我的个人Github帐户添加为存储库中的合作者之一。之后我就可以克隆这个项目了。