Skip to content

Commit 261a97d

Browse files
committed
updated per feedback
1 parent 4134774 commit 261a97d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/content/docs/guides/working-in-multiple-github-orgs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Host github-department
4242
User git
4343
IdentityFile ~/.ssh/id_rsa_department
4444
IdentitiesOnly yes
45+
UseKeychain yes # Mac only if you're using keychain
4546
```
4647

4748
- HostName: The actual domain (e.g., github.com).
@@ -53,13 +54,16 @@ Host github-department
5354
- Ensure the SSH agent is running: `eval "$(ssh-agent -s)"`.
5455
- Add your private key to the agent: `ssh-add ~/.ssh/id_rsa_department`
5556
- Verify the keys currently managed by the agent with `ssh-add -l`
57+
- Optional for Macs: add to keychain: `ssh-add --apple-use-keychain ~/.ssh/id_rsa_department`
5658

5759
## Step 5: Test and use the keys
5860

5961
To test the configuration, reference the host alias you created: `ssh -T git@github-department`
6062

6163
When cloning, you can use the alias in the repo URL if needed, though in many cases Git may automatically select the correct key.
6264

65+
To clone with your alias: `git clone git@github-department:org_name/repo_name.git`
66+
6367
## Step 6: Authorize SSO on your key (if using SSO)
6468

6569
Return to your [SSH and GPG keys](https://github.com/settings/keys) section and [authorize the SSH key for SSO](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-single-sign-on/authorizing-an-ssh-key-for-use-with-single-sign-on).

0 commit comments

Comments
 (0)