SSH vs HTTPS for Git Remotes in GitKraken
Decide between SSH and HTTPS authentication in GitKraken, compare trade-offs, and validate your setup with a test push.
07 Aug 2025, 21:38 UTC

The decision: SSH or HTTPS for your remote
You add a remote repository in GitKraken and the dialog asks whether to use SSH or HTTPS. The choice changes how GitKraken authenticates every push, pull, and fetch, and switching later means updating stored credentials on every developer machine. If your team uses two-factor authentication, one option avoids repeated token prompts; the other is faster to set up but requires token rotation.
Useful takeaway: Choose SSH when you can manage key pairs and want token-free operations with two-factor authentication. Choose HTTPS when you need fast onboarding with existing web credentials and can maintain personal access token rotation.
Constraints to check first
Before deciding, confirm these items for your team:
- Hosting provider: GitHub, GitLab, or Bitbucket, since each has its own SSH key and personal access token settings.
- Operating system: Windows, macOS, or Linux, because SSH agent integration differs.
- GitKraken tier: Free, Standard, Pro, or Enterprise; some remote-management UI may require a paid license.
- Authentication policy: whether two-factor authentication is required and how often credentials may be rotated.
SSH versus HTTPS comparison
| Factor | SSH | HTTPS |
|---|---|---|
| Credential type | Public and private key pair | Username and personal access token (PAT) |
| Typical storage | SSH agent, OS keychain, or Pageant | OS credential manager |
| Two-factor authentication | Works naturally after the public key is uploaded | PAT required; account password alone is usually insufficient |
| Per-operation prompts | Usually none after the agent is unlocked | Possible when tokens expire or the credential helper is missing |
| Rotation | Replace the public key on the hosting provider | Generate a new PAT and update the stored credential |
| Onboarding effort | Higher: generate, back up, and distribute keys | Lower: reuse the web login flow |
Trade-offs
SSH removes the need to enter a token for every operation and works well with two-factor authentication because the private key proves identity locally. The downside is operational overhead: each developer must generate a key pair, back up the private key, and upload the public key to the hosting provider. Never commit a private key to a repository or paste it into a public integration.
HTTPS is simpler to onboard because it reuses existing web credentials and credential helpers. The trade-off is token management: personal access tokens have expiration dates and scope limits, and revoking a token breaks automated pushes until the stored credential is updated. GitKraken caches authentication material, so changing or revoking a token or key may require signing out of the hosting integration or clearing stored credentials before the new method takes effect.
Implementation: switch a remote to SSH
This example changes an existing HTTPS remote to SSH. Run commands in GitKraken's integrated terminal or a system terminal inside the repository.
1. Confirm the current remote
git remote -v
Where: terminal inside the local repository.
Permissions: read access to the local Git config.
Expected check: output lists origin with an https:// URL for fetch and push.
Risk: none; this is read-only.
2. Generate an SSH key pair
ssh-keygen -t ed25519 -C "[contact removed]"
Where: terminal on the developer machine.
Permissions: none special.
Expected check: creates ~/.ssh/id_ed25519 and ~/.ssh/id_ed25519.pub.
Risk: using the default path overwrites an existing key pair if one exists. Choose a custom path if needed.
Upload the contents of id_ed25519.pub to the SSH keys section of GitHub, GitLab, or Bitbucket. The exact menu path varies by provider and by GitKraken tier.
3. Update the remote URL
git remote set-url origin [contact removed]:owner/repo.git
Where: terminal inside the repository, or GitKraken's remotes panel.
Permissions: write access to the local Git config.
Expected check: git remote -v now shows the git@ URL.
Risk: push and pull fail until the public key is registered with the provider and the SSH agent is running.
4. Validate authentication
- Run a fetch or pull in GitKraken. Success without a credential prompt means the SSH agent or cached credentials are working.
- Run a test push to a branch you can delete afterward.
- Diagnostic check: remove the public key from the hosting provider. GitKraken should reject authentication, confirming the configured method is enforced.
Rollback
Changing a remote URL modifies local repository state. To revert to HTTPS:
git remote set-url origin https://github.com/owner/repo.git
Then re-enter the username and personal access token in GitKraken's credential manager when prompted.
Limitations
- GitKraken's credential UI differs across Free, Standard, Pro, and Enterprise tiers and across Windows, macOS, and Linux.
- SSH passphrase handling may behave differently with Pageant on Windows, Keychain on macOS, or ssh-agent on Linux.
- Some advanced remote-management features may require a paid GitKraken tier; verify your license before relying on them.
- This guide describes well-established Git and GitKraken behavior, but the current application version should be verified because the interface and tier availability can change.
Practical check
Run git remote -v to confirm the URL scheme, perform a test push and pull to confirm authentication works without prompts, and revoke the token or remove the SSH public key to confirm GitKraken rejects access. If authentication still succeeds after revocation, GitKraken is likely using cached credentials rather than the method you intended to test.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.