Set Up SSH for GitHub on Windows π
Learn how to configure SSH for GitHub on Windows with our step-by-step guide and official documentation link.

Max O'Didily
12.1K views β’ May 18, 2025

About this video
How to Setup SSH for Github on Windows
Link to Github documentation: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Link to download Gitbash: https://git-scm.com/downloads/win
Commands used in this tutorial to setup SSH for Github:
Gitbash command:
ssh-keygen -t ed25519 -C "your_email@example.com"
Open up Powershell with Admin permissions:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
ssh-add c:/Users/YOU/.ssh/id_ed25519
After adding the SSH key to your github account, return to Powershell:
ssh -T git@github.com
Those are all the commands needed to setup git SSH on your Windows computer.
Greetings, in this Github tutorial we shall be looking up how to setup token-based authentication with SSH keys and Github. The first step is to make sure you have Gitbash dowloaded and installed. Once you have that, open up Gitbash and do the follwoing command: ssh-keygen -t ed25519 -C "your_email@example.com" Replace the email address with the email address your github account uses. Remember to include the speechmarks around the email address when doing this command.
You will then be asked to enter a file name to store the SSH key. You can give a custom file name if you like but if you just press enter, Gitbash will make one for you. You will then be asked to give your SSH key a passphrase. You can if you want but I won't be in this tutorial. Some applications sometimes have issues with SSH passkeys, like the Unity package manager. You can just press enter to not add in a passkey.
That is all you need to do in Gitbash. But keep it open as it shows the filepath on where the SSH key was made which will be needed later. Now open up Windows Powershell in admin mode. You press the windows key and search for Powershell to open it up.
You want to copy and paste:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
Into windows powershell. Then press enter. This will launch the SSH agent. Then do the follwoing command:
ssh-add c:/Users/YOU/.ssh/id_ed25519
Replace the YOU with your windows username. Or just make sure the filepath in this command matches the filepath of the ssh key that Gitbash told you about after making the ssh key. If you didn't give a custom filename for where the ssh key should be stored, you should only need to change the username part of the file path. KEEP POWERSHELL OPEN! DO NOT CLOSE IT YET.
After that you need to navigate to the pub located in this folder file c:/Users/YOU/.ssh/ (replace YOU with your windows username) or just look at the pub file path in Gitbash as it will tell you where it is located after generating the ssh key.
Open up the pub file in text editing software like notepad or notepad++.
Then copy everything in the file. You can use CTRL + A to select everything.
Go to Github.com and log into your github account. Then go to settings, then SSH and GPG keys. Then click on New SSH key. Then give your key a title, it can be whatever you want. Make sure the key type is authentication key and for the key itself, paste in everything from the pub file you coppied before. Then click on add SSH key.
Now you need to go back to Powershell. If you did close it, you will need to run this command again:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
If you kept it open, no need to run the above command again. Now you need to do the following command:
ssh -T git@github.com
This tests whether your SSH key is correctly set up and can authenticate with GitHub. It confirms that your machine can securely connect to GitHub using SSH without needing a username or password. If your SSH key is not setup correctly, this command will allow you to get it setup. A known_hosts file will be made. If you delete it, you will need to redo the step of doing: ssh -T git@github.com
Now go to a github repo and and click on the code button. Then click on the SSH tab and click the copy button next to the SSH clone url. You can then clone that url in software like Github desktop, Source tree or even via commands in Gitbash.
That's all you need to do to setup SSH for Github on Windows.
Thanks for watching this tutorial on setting up SSH keys for Github.
If this tutorial on how to configure GitHub SSH was useful, then be sure to subscribe for more Github tutorials.
How to Setup SSH for Github on Windows
How to configure GitHub SSH
How to setup SSH for GitHub repository
Setting Up SSH Keys for GitHub
Generate a New SSH Key and Add it to your GitHub
How to set up SSH keys for Git / Github
Setup Git and GitHub SSH on Windows
How to setup SSH Key Authentication with Github
How to configure command line git to use ssh key
How to setup SSH in GitHub
Generating a new SSH key and adding it to the ssh-agent
Connecting to GitHub with SSH
Setup SSH for GitHub
How to setup SSH for GitHub
How to setup SSH for Github
Link to Github documentation: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Link to download Gitbash: https://git-scm.com/downloads/win
Commands used in this tutorial to setup SSH for Github:
Gitbash command:
ssh-keygen -t ed25519 -C "your_email@example.com"
Open up Powershell with Admin permissions:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
ssh-add c:/Users/YOU/.ssh/id_ed25519
After adding the SSH key to your github account, return to Powershell:
ssh -T git@github.com
Those are all the commands needed to setup git SSH on your Windows computer.
Greetings, in this Github tutorial we shall be looking up how to setup token-based authentication with SSH keys and Github. The first step is to make sure you have Gitbash dowloaded and installed. Once you have that, open up Gitbash and do the follwoing command: ssh-keygen -t ed25519 -C "your_email@example.com" Replace the email address with the email address your github account uses. Remember to include the speechmarks around the email address when doing this command.
You will then be asked to enter a file name to store the SSH key. You can give a custom file name if you like but if you just press enter, Gitbash will make one for you. You will then be asked to give your SSH key a passphrase. You can if you want but I won't be in this tutorial. Some applications sometimes have issues with SSH passkeys, like the Unity package manager. You can just press enter to not add in a passkey.
That is all you need to do in Gitbash. But keep it open as it shows the filepath on where the SSH key was made which will be needed later. Now open up Windows Powershell in admin mode. You press the windows key and search for Powershell to open it up.
You want to copy and paste:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
Into windows powershell. Then press enter. This will launch the SSH agent. Then do the follwoing command:
ssh-add c:/Users/YOU/.ssh/id_ed25519
Replace the YOU with your windows username. Or just make sure the filepath in this command matches the filepath of the ssh key that Gitbash told you about after making the ssh key. If you didn't give a custom filename for where the ssh key should be stored, you should only need to change the username part of the file path. KEEP POWERSHELL OPEN! DO NOT CLOSE IT YET.
After that you need to navigate to the pub located in this folder file c:/Users/YOU/.ssh/ (replace YOU with your windows username) or just look at the pub file path in Gitbash as it will tell you where it is located after generating the ssh key.
Open up the pub file in text editing software like notepad or notepad++.
Then copy everything in the file. You can use CTRL + A to select everything.
Go to Github.com and log into your github account. Then go to settings, then SSH and GPG keys. Then click on New SSH key. Then give your key a title, it can be whatever you want. Make sure the key type is authentication key and for the key itself, paste in everything from the pub file you coppied before. Then click on add SSH key.
Now you need to go back to Powershell. If you did close it, you will need to run this command again:
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
If you kept it open, no need to run the above command again. Now you need to do the following command:
ssh -T git@github.com
This tests whether your SSH key is correctly set up and can authenticate with GitHub. It confirms that your machine can securely connect to GitHub using SSH without needing a username or password. If your SSH key is not setup correctly, this command will allow you to get it setup. A known_hosts file will be made. If you delete it, you will need to redo the step of doing: ssh -T git@github.com
Now go to a github repo and and click on the code button. Then click on the SSH tab and click the copy button next to the SSH clone url. You can then clone that url in software like Github desktop, Source tree or even via commands in Gitbash.
That's all you need to do to setup SSH for Github on Windows.
Thanks for watching this tutorial on setting up SSH keys for Github.
If this tutorial on how to configure GitHub SSH was useful, then be sure to subscribe for more Github tutorials.
How to Setup SSH for Github on Windows
How to configure GitHub SSH
How to setup SSH for GitHub repository
Setting Up SSH Keys for GitHub
Generate a New SSH Key and Add it to your GitHub
How to set up SSH keys for Git / Github
Setup Git and GitHub SSH on Windows
How to setup SSH Key Authentication with Github
How to configure command line git to use ssh key
How to setup SSH in GitHub
Generating a new SSH key and adding it to the ssh-agent
Connecting to GitHub with SSH
Setup SSH for GitHub
How to setup SSH for GitHub
How to setup SSH for Github
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
12.1K
Likes
239
Duration
5:32
Published
May 18, 2025
User Reviews
4.6
(2) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.