F
F
FilatovNikita2018-03-04 20:23:14
git
FilatovNikita, 2018-03-04 20:23:14

Why doesn't the git remote set-url command work?

Good afternoon ! I want to push all changes to the master and I get this kind of error
fatal: remote error: You can't push to git://github.com/user/repo.git Use https://github.com/user/repo.git
In order to fix this, I go and write the command
git set-url origin https://github.com/username/repo.git
Then I enter git remote -v and I still have the old link as before (git:// github.com/user/repo.git) although in config everything changed to http. In general, I will be very grateful if someone knows how to fix this, I don’t know maybe it’s cached somewhere, but on my laptop I recently noticed this happens all the time, I just can’t launch any project because of this mistakes, thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2018-03-04
@VladimirAndreev

git remote origin set-url seems to be

T
toxa82, 2018-03-04
@toxa82

git remote set-url origin https://github.com/username/repo.git

I don’t remember exactly, but there was some peculiarity in working with https urls. Either they are read-only, or it was necessary to configure access there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question