Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Bash: remote error: You can't push to git://github.com/

Tags:

git

git-push

Please, help me, how can I fix this error ?

$git push origin dev fatal: remote error:  You can't push to git://github.com//name_of_repo.git  Use https:://github.com//name_of_repo.git 
like image 651
Yuriy Lisovskiy Avatar asked Mar 11 '17 13:03

Yuriy Lisovskiy


People also ask

How do I fix error failed to push some refs to GitHub?

If you get a failed to push some refs to error, the main thing to do is git pull to bring your local repo up to date with the remote.

Can not push code to GitHub?

Under Account settings, click on the Developer settings tab. Select Personal access tokens from the left tab. Select the Scope of access you want the token to have to your GitHub account. REMEMBER to copy your personal access token someplace SAFE!


2 Answers

Use an HTTPS or SSH URL. Instead of git://github.com/user/repo.git use one of these:

You can change it in your clone like this:

git remote set-url origin <THE-URL-HERE> 
like image 148
ThiefMaster Avatar answered Oct 14 '22 03:10

ThiefMaster


I had the same error, and this worked for me, which I found here: https://coderwall.com/p/7begkw/fatal-remote-error-you-can-t-push-to-git

git remote rm origin  git remote add origin [email protected]:user/repo.git git push origin master 
like image 29
Gabi Avatar answered Oct 14 '22 02:10

Gabi