TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you manage multiple Git profiles (GitHub, Gitlab, Bitbucket)?

6 pointsby vseplet19 days ago
(For example) I have a personal GitHub, a work GitLab, and a secret Bitbucket project.<p>How do you handle multiple Git identities? Any tools, workflows, or best practices you recommend?

2 comments

mubou19 days ago
Are you talking about your git name and email? Because you can set that (and other settings) per-repo simply by omitting --global in `git config`.<p>If you have multiple github accounts, you can use separate keys by defining custom hosts in your ssh config, but that doesn&#x27;t seem relevant in your case.
评论 #43807905 未加载
1oooqooq18 days ago
you must learn to properly set up ssh via ssh config file. then use a hostname alias for each identity.<p>this is required online security 101 btw. otherwise you&#x27;re sending your full keychain identity (all your pub keys) to every ssh server you try to connect