Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Allow different urls for push and fetch #191

Open
GoogleCodeExporter opened this issue Apr 8, 2015 · 1 comment
Open

Enhancement: Allow different urls for push and fetch #191

GoogleCodeExporter opened this issue Apr 8, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Affected Version: 1.21

We are using repo to fetch different repos but without gerrit.
The repositories are fetched via HTTPS in read only mode. Developers with push 
access will push to the repositories via SSH.

So for us it would be nice to be able to specify an additional URL for each 
remote.

Proposal:
Currently a remote is defined like this:
<remote fetch="https://gitserver.local/mirror/" name="mirror" />

With the extension it would be possible to write:
<remote fetch="https://gitserver.local/mirror/" 
push="git@gitserver.local/mirror.git" />

Original issue reported on code.google.com by pasci.bach@gmail.com on 7 Jan 2015 at 9:28

@GoogleCodeExporter
Copy link
Author

In case somebody has the same issue. Here is a workaround.

Just add the following to your ~/.gitconfig

[url "git@gitserver.local:"]
        pushInsteadOf = https://gitserver.local/

This way git will rewrite the url for you.

See: http://git-scm.com/docs/git-config and 
https://www.kernel.org/pub/software/scm/git/docs/git-fetch.html


Original comment by pasci.bach@gmail.com on 28 Jan 2015 at 8:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant