Allow multiple account credentials
### Describe the feature or problem you’d like to solve I have two accounts on github each with access to a different set of private repositories. Currently I use a combination of git's `[IncludeIf ...]` config and a custom config which overrides the SSH private key I use for certain repositories. E.g.: In `~/.gitconfig`: ``` [includeIf "gitdir:~/work/"] path = ~/work/.gitconfig ``` and in `~/work/.gitconfig`: ``` [core] sshCommand = "ssh -i ~/.ssh/work" ``` It will be great if the credentials for `gh` can also be configured per repository as well. ### Proposed solution There are a bunch of options I can think of: * Allow overriding `gh` config by a file in a local clone's `.git` directory * Allow defining rules in the `gh` config which defines which repos/orgs should use which credential. E.g. ``` github.com/google: - user: gemployee oauth_token: ... github.com/microsoft: - user: msemployee oauth_token: ... github.com: - user: personal oauth_token: ... ``` **How will it benefit CLI and its users?** It will allow Github users with multiple accounts of varying access to seamlessly work on different repositories.
Posted by ncmans on Feb 7, 2020, 4:29 AM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Allow multiple account credentials
### Describe the feature or problem you’d like to solve I have two accounts on github each with access to a different set of private repositories. Currently I use a combination of git's `[IncludeIf ...]` config and a custom config which overrides the SSH private key I use for certain repositories. E.g.: In `~/.gitconfig`: ``` [includeIf "gitdir:~/work/"] path = ~/work/.gitconfig ``` and in `~/work/.gitconfig`: ``` [core] sshCommand = "ssh -i ~/.ssh/work" ``` It will be great if the credentials for `gh` can also be configured per repository as well. ### Proposed solution There are a bunch of options I can think of: * Allow overriding `gh` config by a file in a local clone's `.git` directory * Allow defining rules in the `gh` config which defines which repos/orgs should use which credential. E.g. ``` github.com/google: - user: gemployee oauth_token: ... github.com/microsoft: - user: msemployee oauth_token: ... github.com: - user: personal oauth_token: ... ``` **How will it benefit CLI and its users?** It will allow Github users with multiple accounts of varying access to seamlessly work on different repositories.
Comments (0)
No comments yet. Start the discussion.