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

Remote specific protocol settings (configuration, feature request) #1435

Open
mpacer opened this issue Mar 14, 2017 · 4 comments
Open

Remote specific protocol settings (configuration, feature request) #1435

mpacer opened this issue Mar 14, 2017 · 4 comments

Comments

@mpacer
Copy link

mpacer commented Mar 14, 2017

Would it be possible to have a default protocol specific to different commands?

The use case I have in mind is having ssh access to all of my personal repositories (which I tend to refer to as origin), but only https access to upstream repositories (which I tend to refer to as upstream).

This acts as a safety measure, as I can easily push to origin over ssh, but need to go through additional steps to push to upstream repositories, for example when making a release and tagging that release through GitHub.

@Carreau for introducing this method to me.

@mislav
Copy link
Owner

mislav commented Jun 26, 2017

Will this be addressed if we add a .hubconfig file that you can put in the working copy of an individual repository? Because that is planned.

@mpacer
Copy link
Author

mpacer commented Jun 26, 2017

Not quite. This would involve being able to specify a ssh vs https connection for different remotes on the same repository, specifically upstream vs. origin. In practice they are both remote they are just associated with my github repo (e.g., https://github.com/mpacer/nbconvert) vs. the upstream (https://github.com/jupyter/nbconvert).

Failure on my part to use language precisely originally.

Local and remote should have been origin and upstream, changing that now.

@mislav
Copy link
Owner

mislav commented Jun 26, 2017

Ah, I see now.

Where do you envision these configuration options be kept? Would this global configuration encompass all same-named remotes, e.g. special casing for "upstream" remote (if configured) would be applied to every repo on your machine?

@Carreau
Copy link

Carreau commented Jun 26, 2017

I guess using something like conditional includes, and/or pushInsteadOf, though these two options do now allow to match on the name of the remote but only on the urls/gitdir. I don't know of any config that allow a per-remote-name configuration but I at least tend to name my remote consistently so a global config would indeed be awesome.

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

3 participants