Unable to push branch on github "Use git @ github.com: Paratron / spacebattles.git"

I have a working branch in the Mac name database, and I would like to push this branch to GitHub and tried to do this by doing:

git push -u origin database 

And get the following error message:

 You can't push to git://github.com/Paratron/spacebattles.git Use git@github.com :Paratron/spacebattles.git 

Are there known problems that may be causing this? Are there any probable errors that I could make that lead to this error?

+4
source share
2 answers

As the saying goes, you cannot click git://github.com/Paratron/spacebattles.git (because it is a read-only URL). Try the following:

 git remote set-url origin git@github.com :Paratron/spacebattles.git git push -u origin database 

If you have never used git this way, you first need to configure it to work with GitHub: http://help.github.com/mac-set-up-git/

Also, are you Paratron? If not, you need to unlock his repository first: http://help.github.com/fork-a-repo/ . Then you will need to use your username ( git@github.com :YOUR_USERNAME/spacebattles.git ).

+9
source

The URL you set for the repository is a read URL. You will need to change the URL of the remote device using remote set-url :

 git remote set-url origin git@github.com :Paratron/spacebattles.git 
+2
source

Source: https://habr.com/ru/post/1413061/


All Articles