Open PowerShell and run:
ssh-keygen -t ed25519 -C "your_email@example.com" -f "C:\Users\YourName\.ssh\some_service_key"- Press Enter to accept the default location:
C:\Users\YourName\.ssh\some_service_key - Add a strong passphrase (recommended) or leave blank
Start-Service ssh-agent
ssh-add $env:USERPROFILE\.ssh\some_service_keyYou should see:
Identity added: C:\Users\YourName\.ssh\some_ssh_key
Set-Service -Name ssh-agent -StartupType AutomaticGet-Content $env:USERPROFILE\.ssh\some_ssh_key.pub | Set-Clipboard- Go to the Bitbucket-Server.
- Manage account
- "SSH-Keys"
- Click "Add key"
- In the "Key" text area, paste the key using
Ctrl + V - Enter a key label.
- Define the expiration time.
- Click "Save"
Use the SSH URL:
git clone git@bitbucket.arpa:project-name/your-repo.gitUpdate the remote URL:
git remote set-url origin git@bitbucket.arpa:project-name/your-repo.gitGit for Windows uses its own SSH client by default.
Set Git to use the Windows OpenSSH client:
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"ssh -T git@github.comExpected output:
Hi your-username! You've successfully authenticated...
git config --global gpg.format ssh
git config --global user.signingkey "$env:USERPROFILE\\.ssh\\id_ed25519.pub"
git config --global commit.gpgsign trueYou now have:
- β SSH access to GitHub (no tokens/passwords)
- π Passphrase-free push/pull via ssh-agent
- π§Ύ Verified commits with SSH signing