Git - Fatal: don't delete all non-dotted urls

When trying to remove the default url in my repo, I issued the command:

git remote set-url --delete origin https://github.com/dpressey/barberapp.git

      

I got the error as shown above in the title. How do I remove this "https" url and then add the "ssh" url so I can click on it?

+3


source to share


2 answers


If you want to reset the origin to a different url, you can override it directly:

$ git remote set-url origin ssh://yournewurl

      



and test it using:

$ git remote -v

      

+3


source


From Git remote

documentation
, --delete

should work with:

git remote set-url --push --delete origin [https://github.com/dpressey/barberapp.git]

because the syntax --delete <name> <url>

is where <url>

is regex.




As a side note, it should be pointed out that there is also git remote rm <name>

one that removes all remote objects matching the given name, regardless of the URLs.

+4


source







All Articles