Skip to content

How to use different github.com accounts in different vscode instances #257

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

Open
copdips opened this issue Sep 6, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@copdips
Copy link

copdips commented Sep 6, 2023

Hello,

I have 2 github.com accounts (perso and work).
In order to use both under the same linux bash with git commands, I use the method described here.

# Personal GitHub account
Host github.com
 HostName github.com
 User git
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/id_rsa

# Work GitHub account
Host github.com-work
 HostName github.com
 User git
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/work_rsa

For personal githubom repos:
git remote add origin git@github.com:[my work GitHub group]/[my project].git

For work github.com repos:
git remote add origin git@github.com-work:[my work GitHub group]/[my project].git

With vscode, i can only authenticated to a single github.com account, is there an easier way to have both available ?

@copdips copdips added the bug Something isn't working label Sep 6, 2023
@copdips copdips changed the title No github repository found. Please open a folder that contains github repository How to use different github.com accounts in different vscode instances Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog 🗒
Development

No branches or pull requests

1 participant