Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change git remote origin git:// to https://? [duplicate]

Tags:

git

github

I wrote in git Bash this

git remote -v 
origin  git://github.com/devRena/test (fetch) 
origin  git://github.com/devRena/test (push)

and when i say

git push origin master 
fatal remote error: 
You can't push to git://github.com/devRena/test.git   
Use https://github.com/devRena/test.git

How to change git://github.com/devRena/test.git to https://github.com/devRena/test.git ??

like image 810
devRena Avatar asked Apr 25 '18 10:04

devRena


People also ask

What is the difference between git clone and git remote add origin?

GIT REMOTE add just creates an entry in your git configuring that specifies a name for a particular URL. You must have an existing git report to use this. GIT CLONE creates a new git repository by copying an existing one located at the URL you specify.


1 Answers

You can simply edit by hand the .git/config file.

Find the section that starts with:

[remote "origin"]

Replace:

url = https://github.com/USERNAME/REPOSITORY.git

with

url https://github.com/devRena/test.git

save

like image 129
dmg Avatar answered Oct 12 '22 20:10

dmg