Specify an SSH key for git push for a given domain - Stack Overflow
You can now access your Teams at stackoverflowteams.com. Teams no longer appear in the left sidebar on stackoverflow.com. Check your email to learn more about these changes. Find centralized, trusted content and collaborate around the technologies you use most. Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. I have the following use case: I would like to be able to push to git@git.company.com:gitolite-admin using the private key of user gitolite-admin, while I want to push to git@git.company.com:some_repo using 'my own' private key. AFAIK, I can't solve this using ~/.ssh/config, because the user name and server name are identical in both cases. As I mostly use my own private key, I have that defined in ~/.ssh/config for git@git.company.com. Does anyone know of a way to override the key that is used for a single git invocation? (Aside: gitolite distinguishes who is doing the pushing based on the key, so it's not a problem, i
Specify an SSH key for git push for a given domain - Stack Overflow New: Stack Overflow For Agents. The next generation of knowledge exchange. Learn more Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives Stack Internal Knowledge at work Bring the best of human thought and AI automation together at your work. Explore Stack Internal Specify an SSH key for git push for a given domain Ask Question Asked 14 years, 7 months ago Modified 2 months ago Viewed 483k times 562 I have the following use case: I
Explore this link on the map →saved by
related reading
- Multiple SSH keys for different accounts on Github or Gitlab (Example)coderwall.com
- git with IntelliJ IDEA: Could not read from remote repository - Stack Overflowstackoverflow.com
- How do I change the URI (URL) for a remote Git repository? - Stack Overflowstackoverflow.com
- SSH keys - ArchWikiwiki.archlinux.org
- github - Git asks for username every time I push - Stack Overflowstackoverflow.com
- linux - "Unable to find remote helper for 'https'" during git clone - Stack Overflowstackoverflow.com
- Git - git-config Documentationgit-scm.com
- How Core Git Developers Configure Git | Butler's Logblog.gitbutler.com
- Dashboardgitpod.io
- GitHub RCE Vulnerability: CVE-2026-3854 Breakdown | Wiz Blogwiz.io
- How to create a new gitlab repo from my existing local git repo, using CLI? - Stack Overflowstackoverflow.com
- How to Use SSH-Keygen to Generate an SSH Key on Macmakeuseof.com