Description:
Our organization has recently moved to the enterprise version of GitHub with Single Sign-On (SSO) enforcement. This guide provides clear steps to configure your SSH access correctly to avoid authentication issues while working with Git repositories.
Note: This guide has been prepared to assist in resolving the recent GitHub access issues we’ve encountered, particularly those related to SSH authentication. We hope it proves helpful in addressing these challenges smoothly.
- Git must be installed on your system.
- A GitHub account (https://github.com/)
- Terminal (Linux/macOS) or Git Bash (Windows)
ssh-keygen -t ed25519 -C "your_email@example.com"
# Or if ed25519 is not supported
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"Accept the default path or provide a custom one. Optionally, add a passphrase.
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519cat ~/.ssh/id_ed25519.pubCopy the contents manually or use:
- Linux:
xclip -sel clip < ~/.ssh/id_ed25519.pub - macOS:
pbcopy < ~/.ssh/id_ed25519.pub - Windows (Git Bash):
clip < ~/.ssh/id_ed25519.pub
- Go to GitHub
- Profile → Settings → SSH and GPG Keys → New SSH Key
- Add a title and paste your key, then click Add SSH Key
If your GitHub organization uses SSO (Single Sign-On) as part of the Enterprise plan, you must authorize your SSH key after adding it:
- After adding the key, you'll see an option to "Enable SSO"
- Click Enable SSO and select the appropriate organization
ssh -T git@github.comIf prompted, type yes. A successful message looks like:
Hi <your-username>! You've successfully authenticated, but GitHub does not provide shell access.
| Error | Solution |
|---|---|
Permission denied (publickey) |
Check if SSH key is added and SSO is enabled |
Could not resolve hostname |
Check your internet connection or proxy settings |
Repository not found |
Ensure you have access and the SSH URL is correct |
| Step | Task |
|---|---|
| 1 | Generate SSH Key |
| 2 | Add key to SSH Agent |
| 3 | Copy public key |
| 4 | Add key to GitHub |
| 5 | Enable SSO if applicable |
| 6 | Test SSH connection |