git push origin给refspec的远程部分不是一个有效的名字 [英] git push origin gives remote part of refspec is not a valid name
问题描述
我用
的GitHub账户创建了一个远程仓库 https://github.com /darKoram/sphero_tracker.git 。到目前为止,它只包含一些wiki页面,但我准备上传我的代码。
我使用
git push origin git@github.com:/darkoram/shpero_tracker.git
我也试过了
git push origin https://github.com/darKoram/sphero_tracker.git
两次我得到
远程部分的refspec在 https://github.com/darKoram/sphero_tracker.git中不是有效的名称
我以前没有遇到过任何问题。只是不知道我在这里做错了什么。
我进一步了解了一点。按照marshall的指示和下面的generate-ssh-keys链接,但仍然得到
git push -u origin master
错误:找不到存储库。
致命:远程终端意外挂断
我已经确定我的ssh密钥很好,并验证它们存在于github上,并添加了内容我的id_rsa.pub到我的github(它说这个键已经存在)。
$ ssh -T git@github.com
嗨darKoram!您已成功通过身份验证,但GitHub不提供shell访问权。
https://help.github.com/articles/generating-ssh-keys
ssh -T -p 443 git@ssh.github.com
主机'ssh.github.com]的真实性:443([207.97.227.248]:443)'无法建立。
RSA密钥指纹是16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48。
您确定要继续连接(是/否)吗?是
警告:在已知主机列表中永久添加'[ssh.github.com]:443,[207.97.227.248]:443'(RSA)。
嗨darKoram!您已成功通过身份验证,但GitHub不提供shell访问权限
git remote -v
origin git@github.com:darKoram / shpero_tracker.git(fetch )
原产地git@github.com:darKoram / shpero_tracker.git(推)
但回购当然似乎存在
http://www.pasteall.org/pic/show.php?id=36560
为什么不按照?
:darkoram / shpero_tracker.gitgit push -u origin master
发行人正在说推送到名为 origin
的分支机构名为 git@github.com的分行:/darkoram/shpero_tracker.git
,这显然是不正确的。
I have created a remote repo using my GitHub account at https://github.com/darKoram/sphero_tracker.git. So far it just contains some wiki pages, but I'm ready to upload my code.
I use
git push origin git@github.com:/darkoram/shpero_tracker.git
I also tried
git push origin https://github.com/darKoram/sphero_tracker.git
both times I get
remote part of refspec is not a valid name in https://github.com/darKoram/sphero_tracker.git
I've pushed before without problems. Just don't know what I'm doing wrong here.
I got a little further. Followed the instructions by marshall and the generating-ssh-keys link below, but still get
git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly
I've established that my ssh keys are good and verified that they exist on github by tring to add what's in my id_rsa.pub to my github (it said the key already existed).
$ ssh -T git@github.com Hi darKoram! You've successfully authenticated, but GitHub does not provide shell access.
https://help.github.com/articles/generating-ssh-keys
ssh -T -p 443 git@ssh.github.com The authenticity of host '[ssh.github.com]:443 ([207.97.227.248]:443)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[ssh.github.com]:443,[207.97.227.248]:443' (RSA) to the list of known hosts. Hi darKoram! You've successfully authenticated, but GitHub does not provide shell access
git remote -v origin git@github.com:darKoram/shpero_tracker.git (fetch) origin git@github.com:darKoram/shpero_tracker.git (push)
but the repo certainly seems to exist http://www.pasteall.org/pic/show.php?id=36560
Why not follow the instructions GitHub gives you?
git remote add origin git@github.com:darkoram/shpero_tracker.git
git push -u origin master
The commands you're issuing are saying "push to the remote repo named origin
the branch named git@github.com:/darkoram/shpero_tracker.git
", which is obviously not correct.
这篇关于git push origin给refspec的远程部分不是一个有效的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!