Working with GitHub on Windows can be painless and secure if you set it up the right way.
In this article, you will learn three complete workflows
- SSH from Command Prompt or PowerShell for passwordless, secure pushes and pulls
- GitHub Desktop the GUI option no SSH setup required
- No keygen methods working over HTTPS using a Personal Access Token or the GitHub web editor
Why SSH vs HTTPS on Windows
SSH uses a key pair stored on your machine. No password or token prompts once configured.
HTTPS uses your GitHub login or Personal Access Token PAT. Works out of the box with GitHub Desktop.
Web editor lets you make commits right in your browser with no local setup needed.
SSH from Windows CMD or PowerShell
Step 1 Check for existing SSH keys
dir %USERPROFILE%\.ssh
Look for
id_ed25519
private
id_ed25519.pub
public
If they exist and you want to reuse them, skip to Step 4.
Step 2 Create a new SSH key
ssh-keygen -t ed25519 -C "you@example.com"
Press Enter to accept default path
%USERPROFILE%\.ssh\id_ed25519
Optionally set a passphrase.
If ed25519 is not supported
ssh-keygen -t rsa -b 4096 -C "you@example.com"
Step 3 Start the SSH agent and load your key
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
ssh-add $env:USERPROFILE\.ssh\id_ed25519
Step 4 Copy your public key
Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub | Set-Clipboard
Step 5 Add the key to GitHub
- Go to Settings then SSH and GPG keys then New SSH key
- Title it for example Windows Laptop
- Paste your key
- Save
Step 6 Test your connection
ssh -T git@github.com
If successful you will see
Hi <username> You have successfully authenticated...
Step 7 Use SSH in Git
Clone
git clone git@github.com:OWNER/REPO.git
Switch existing repo from HTTPS to SSH
git remote set-url origin git@github.com:OWNER/REPO.git
Step 8 Commit and push
git add .
git commit -m "feat: first SSH commit from Windows"
git push origin main
GitHub Desktop The GUI Method No SSH Needed
GitHub Desktop uses HTTPS by default and stores credentials securely. Perfect if you want to skip SSH.
Step 1 Install and sign in
Download from desktop.github.com
Sign in with your GitHub account.
Step 2 Add a repository
Clone from GitHub File → Clone Repository
Add existing project File → Add Local Repository
Step 3 Ensure HTTPS remote
Repository → Repository Settings
Ensure URL is https://github.com/...
Step 4 Commit changes
Edit files in your project folder.
In Desktop, select changed files, write a commit message, click Commit to branch.
Step 5 Push to GitHub
Click Push origin.
To create a PR, click Create Pull Request.
No Keygen Options
Option 1 HTTPS with Personal Access Token
- Create a fine grained PAT in GitHub Settings → Developer settings → Personal Access Tokens
- Switch remote to HTTPS
git remote set-url origin https://github.com/OWNER/REPO.git
git push origin main
- Use your GitHub username and PAT when prompted.
Option 2 GitHub Web Commits
- Open repo on github.com
- Add file → Create new file or edit existing
- Write changes and commit directly to main or via new branch and PR
Troubleshooting on Windows
Permission denied publickey
Check if your key is loaded
ssh-add -l
If none re-add
ssh-add $env:USERPROFILE\.ssh\id_ed25519
Verify your public key is in GitHub settings.
GitHub Desktop cannot push
Switch to HTTPS in Repository Settings.
Quick SSH Cheat Sheet Windows
ssh-keygen -t ed25519 -C "you@example.com"
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
ssh-add $env:USERPROFILE\.ssh\id_ed25519
Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub | Set-Clipboard
ssh -T git@github.com
git add .
git commit -m "message"
git push origin main
Conclusion
SSH is best for developers who want secure passwordless Git operations.
GitHub Desktop is ideal for a quick GUI based workflow.
HTTPS with PAT or Web Commits let you skip SSH entirely.
Choose the method that fits your workflow and you will never dread pushing to GitHub on Windows again.
Top comments (0)