how to change existing git origin repository URL

0 votes
I have cloned a git repository from github. Now I need to push this repository to private server. How do I do that?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by
selected by
0 votes
Best answer

You might want to open the .git\config as a plain file from Visual Studio and edit its contents.

You'll see that there is a section defining the remote called origin:

[remote "origin"]
    url = git://foo.org/blah.git
    fetch = +refs/heads/*:refs/remotes/origin/*

If you are using HTTPS (SSL) as a transport layer, then you might want to add:

    sslVerify = false

if you are using a self-issued SSL certificate on the server.