Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git push origin gives remote part of refspec is not a valid name

Tags:

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 [email protected]:/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 [email protected] 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 [email protected] 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 [email protected]:darKoram/shpero_tracker.git (fetch) origin [email protected]:darKoram/shpero_tracker.git (push)

but the repo certainly seems to exist http://www.pasteall.org/pic/show.php?id=36560

like image 746
darKoram Avatar asked Aug 14 '12 03:08

darKoram


1 Answers

Why not follow the instructions GitHub gives you?

git remote add origin [email protected]: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 [email protected]:/darkoram/shpero_tracker.git", which is obviously not correct.

like image 142
Andrew Marshall Avatar answered Sep 22 '22 13:09

Andrew Marshall