Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Push and Fetch points to different URL

Mohamed Najeemudheen November 14, 2017

Hello Guys,

 

I am new to Git, sorry if this is a silly question.

I have different URLs for push and Fetch(read-only repo) configure. Using sourceTree, i can fetch from my read-only repo. But when I want to push changes using SourceTree, I cannot because it is pointing to my read-only repo where i cannot write. How can i achieve something as below using SourceTree

 

$ git remote -v
origin git://git-readonly.abc.com/MyRepo (fetch)
origin git@git.abc.com:MyRepo (push)

 

I have configure it using the command below. But could not make it work with SourceTree. Using Bash it works.

$ git remote set-url --add --push origin git@git.abc.com:MyRepo

1 answer

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2017

Sourcetree doesn't currently support split push/fetch urls, for a single remote, however you can specify a second remote, with push/pull urls and Sourcetree will give the option to choose when pushing or pulling

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events