库推到GitHub的远程
时未找到我的版本库GitHub上所谓的“消息”,并与同名的本地仓库。我试图将文件从我的本地回购推送到远程的,但得到这个错误:库推到GitHub的远程
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly.
我想这是一个身份验证问题。当我跑
ssh -T [email protected]
我确实收到一条消息,指出我的密钥不起作用。所以我将我的〜/ .ssh/github_rsa.pub添加到我在GitHub上的帐户中的SSH密钥(删除了那里已有的密钥)并再次运行该命令。这一次,我收到一条消息说 -
Hi septerr! You've successfully authenticated, but GitHub does not provide shell access.
从我看到这似乎是预期的消息。所以,我再次尝试推动。但收到同样的错误。未找到存储库。
Swapnas-MacBook-Pro:messages sony$ git remote -v show
origin [email protected]:seterr/messages.git (fetch)
origin [email protected]:seterr/messages.git (push)
Swapnas-MacBook-Pro:messages sony$ git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
当我看着我的回购在GitHub上我看到:
Existing Git Repo?
cd existing_git_repo
git remote add origin [email protected]:septerr/messages.git
git push -u origin master
出了什么问题?
你的远程地址,对比一下github上告诉你:
[email protected]:seterr/messages.git <== your remote
[email protected]:septerr/messages.git <== GitHub actual repo address
您在septerr
忘记了 'p
'。在“GitHub pushing/pulling error”提到
如,GitHub库地址将错字或大小写敏感的。
Nick提到的评论:
I ran into an issue where I needed to change my repo address due to a change in GitHub username.
Here's the code for it:
git remote set-url origin [email protected]:username/reponame.git
This will set the remote name to origin with the GitHub username of username.
如果您收到此错误和拼写错误是不是原因,因为是我的情况下,尝试打开的.git /配置和删除部分:
[remote "origin"]
url = [email protected]:yourgitusername/my_project.git
fetch = +refs/heads/*:refs/remotes/origin/*
然后重新运行以下(替换 'yourgitusername'):
git remote add origin [email protected]:yourgitusername/my_project.git
git push -u origin master
这解决了这个问题对我来说。 感谢这个答案在一个类似的问题:Git Push ERROR: Repository not found
我有同样的问题。我的问题是误解,我必须先推出github上的空回购。卫生署!包括这里给其他没有意识到的人。
我也有这个问题,它原来是我没有授予回购用户访问这样的错误信息是有点误导。
问题是冒号(:)后的用户名。你应该用斜杠,然后它的工作原理:
混帐克隆SSH://[email protected]/USERNAME/REPONAME。git
分号表示PORT不是用户名在ssh url中。
混帐克隆SSH://[email protected]:22/REPONAME.git
如果您使用的是Mac OS上-X和对远程一个HTTPS URL无凭据,然后钥匙串可能用于凭证。
您的KeyChain中的凭据可能不正确吗?也许你已经改变了你的密码,或者你有两个Github账户,但错误的账户正在使用?
如果有疑问请打开KeyChain应用程序并删除“github.com”条目,然后当您下一步执行提取/拉/推等等时,您将被重新提示输入您的github用户名和密码。
上述所有假设你已经在https://help.github.com/articles/set-up-git#platform-mac
我只有这个问题。谢啦! – shanmugharaj 2017-09-09 02:21:01
这可能帮助别人先前启用的“密码/钥匙扣缓存”按照指导,当你把你的SSH密钥到Github上,你必须添加到您的个人资料设置在您的用户帐户而不是存储库部署密钥。
如果您有多个私有存储库,这将适用于所有这些存储库。我确实犯了一个错误,将我的ssh密钥添加到一个私有存储库,所以当我尝试克隆其他存储库时,出现错误“未找到存储库...”
我希望我能够这样做三次!谢谢! – 2017-01-17 19:02:16
我联系了github支持人员,他们告诉我如果我使用的是Windows机器,请在Windows Credential Manager中检查我的git凭证。似乎不知何故git证书不正确。我纠正了凭据并推动了工作。
“明智的打字错误”。哈哈! +1 – nulltoken 2012-04-17 07:31:51
*砸我的头*谢谢你们! – septerr 2012-04-18 05:28:36
我遇到了一个问题,由于GitHub用户名的更改,我需要更改我的回购地址。下面是它的代码:'git remote set-url origin [email protected]:username/reponame.git' - 这将使用GitHub username用户名将远程名字设置为origin。 – Nick 2012-05-14 19:50:27