From f81510d9b213895856f6709f18da2158c292c1e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:22:50 +0000 Subject: [PATCH 1/3] Initial plan From fb8333aa97ebe9198f914906f8d9270ee412e4bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:25:54 +0000 Subject: [PATCH 2/3] Add VS Code configuration for multiple GitHub accounts support Co-authored-by: SergejNegerisch <181755522+SergejNegerisch@users.noreply.github.com> --- .vscode/README.md | 120 ++++++++++++++++++++++++++++++++++++++++ .vscode/extensions.json | 19 +++++++ .vscode/settings.json | 35 ++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 .vscode/README.md create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.vscode/README.md b/.vscode/README.md new file mode 100644 index 00000000..1147d30a --- /dev/null +++ b/.vscode/README.md @@ -0,0 +1,120 @@ +# VS Code GitHub Multiple Account Configuration + +This directory contains VS Code workspace settings that enable support for multiple GitHub accounts. + +## Features + +- Multiple GitHub account authentication +- Easy switching between GitHub accounts +- Support for GitHub Pull Requests and Issues extension +- Configured queries for assigned PRs, created PRs, and review requests + +## How to Use Multiple GitHub Accounts in VS Code + +### Step 1: Sign in with Your First GitHub Account + +1. Open VS Code +2. Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (macOS) to open the Command Palette +3. Type `GitHub: Sign in` and select it +4. Follow the authentication flow in your browser +5. Authorize VS Code to access your GitHub account + +### Step 2: Add a Second GitHub Account + +1. Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (macOS) again +2. Type `GitHub: Sign in` and select it +3. In the authentication page, you may need to: + - Sign out from your current GitHub session in the browser + - Or use a different browser profile + - Or use an incognito/private window +4. Sign in with your second GitHub account +5. Authorize VS Code to access this account as well + +### Step 3: Switch Between Accounts + +Once you have multiple accounts added: + +1. Look for the GitHub icon in the VS Code status bar (bottom) +2. Click on your current account name +3. A menu will appear showing all your signed-in accounts +4. Select the account you want to use for the current operation + +## Recommended Extensions + +To get the most out of multiple GitHub accounts, install these VS Code extensions: + +- **GitHub Pull Requests and Issues** (GitHub.vscode-pull-request-github) + - Manage PRs and issues directly from VS Code + - Already configured in settings.json + +- **GitHub Repositories** (GitHub.remotehub) + - Browse and edit GitHub repositories directly in VS Code + +## Account-Specific Git Configuration + +If you need different Git configurations (name, email) for different accounts: + +### Option 1: Per-Repository Configuration + +```bash +# In your repository directory +git config user.name "Your Name" +git config user.email "your.email@example.com" +``` + +### Option 2: Conditional Git Configuration + +Add to your `~/.gitconfig`: + +```ini +[includeIf "gitdir:~/work/personal/"] + path = ~/.gitconfig-personal + +[includeIf "gitdir:~/work/company/"] + path = ~/.gitconfig-company +``` + +Then create separate config files: + +**~/.gitconfig-personal:** +```ini +[user] + name = Your Personal Name + email = personal@example.com +``` + +**~/.gitconfig-company:** +```ini +[user] + name = Your Work Name + email = work@company.com +``` + +## Troubleshooting + +### Issue: Can't add second account + +**Solution:** Try these steps: +1. Sign out from all GitHub accounts in your browser +2. Clear VS Code authentication: Run `GitHub: Sign out` from Command Palette for all accounts +3. Start fresh by signing in again + +### Issue: Wrong account is being used for operations + +**Solution:** +1. Check the status bar to see which account is currently active +2. Click on the account name to switch +3. Ensure your git config matches the desired account + +### Issue: Authentication token expired + +**Solution:** +1. Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) +2. Run `GitHub: Sign out` +3. Run `GitHub: Sign in` again to refresh the token + +## Additional Resources + +- [GitHub Authentication in VS Code](https://code.visualstudio.com/docs/editor/github) +- [VS Code GitHub Pull Requests Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) +- [Working with GitHub in VS Code](https://code.visualstudio.com/docs/sourcecontrol/github) diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..65ede969 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,19 @@ +{ + // VS Code Extension Recommendations for GitHub Multi-Account Support + "recommendations": [ + // GitHub Pull Requests and Issues + // Manage pull requests and issues from multiple GitHub accounts + "github.vscode-pull-request-github", + + // GitHub Repositories + // Browse and edit GitHub repositories directly in VS Code + "github.remotehub", + + // GitLens - Git supercharged + // Enhanced Git capabilities with better visualization + "eamodio.gitlens" + ], + + // Extensions that are good to have but not required + "unwantedRecommendations": [] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..43d01a9d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,35 @@ +{ + // GitHub Authentication Settings + // Enable multiple GitHub accounts in VS Code + "github.gitAuthentication": true, + + // GitHub Pull Requests and Issues extension settings + "githubPullRequests.createOnPublishBranch": "ask", + "githubPullRequests.queries": [ + { + "label": "Assigned To Me", + "query": "is:open assignee:${user}" + }, + { + "label": "Created By Me", + "query": "is:open author:${user}" + }, + { + "label": "Waiting For My Review", + "query": "is:open review-requested:${user}" + } + ], + + // Git settings for multiple accounts + "git.enableCommitSigning": false, + "git.requireGitUserConfig": true, + + // Allow using multiple GitHub accounts + // Users can sign in with multiple accounts through: + // 1. Command Palette (Ctrl+Shift+P / Cmd+Shift+P) + // 2. Type "GitHub: Sign in" + // 3. Sign in with additional accounts + // 4. Switch between accounts using the account switcher in the status bar + + "workbench.enableExperiments": true +} From 97eaf3d5dc79dff94b279cf1f095bb8625a57bf6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:27:05 +0000 Subject: [PATCH 3/3] Address code review feedback: improve comments and remove experimental setting Co-authored-by: SergejNegerisch <181755522+SergejNegerisch@users.noreply.github.com> --- .vscode/README.md | 4 ++-- .vscode/settings.json | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.vscode/README.md b/.vscode/README.md index 1147d30a..b3ef4551 100644 --- a/.vscode/README.md +++ b/.vscode/README.md @@ -43,11 +43,11 @@ Once you have multiple accounts added: To get the most out of multiple GitHub accounts, install these VS Code extensions: -- **GitHub Pull Requests and Issues** (GitHub.vscode-pull-request-github) +- **GitHub Pull Requests and Issues** (github.vscode-pull-request-github) - Manage PRs and issues directly from VS Code - Already configured in settings.json -- **GitHub Repositories** (GitHub.remotehub) +- **GitHub Repositories** (github.remotehub) - Browse and edit GitHub repositories directly in VS Code ## Account-Specific Git Configuration diff --git a/.vscode/settings.json b/.vscode/settings.json index 43d01a9d..a4ae811d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,15 +21,14 @@ ], // Git settings for multiple accounts + // Disable commit signing to avoid issues when switching between accounts + // with different GPG keys. Enable per-repository if needed. "git.enableCommitSigning": false, - "git.requireGitUserConfig": true, + "git.requireGitUserConfig": true - // Allow using multiple GitHub accounts // Users can sign in with multiple accounts through: // 1. Command Palette (Ctrl+Shift+P / Cmd+Shift+P) // 2. Type "GitHub: Sign in" // 3. Sign in with additional accounts // 4. Switch between accounts using the account switcher in the status bar - - "workbench.enableExperiments": true }