Github has become almost the defacto standard when it comes to code repository for DevOps. Github occupy large foot print in the Devops space – either in the form of open source GIT or in the form of commercially supported offerings through ISV’s. Github also comes into two flavors – public repository and private repository. As the name indicates, the public repositories are open to entire world without any restrictions. The private repositories are useful when a team wants to collaborate in a closed manner. The aim of this post is to elaborate the steps required for working with Github private repositories from Windows 10.
The first step is to set up keys for SSH and it to ssh key agent.
Open bash for windows 10.
ssh-keygen -t rsa -b 4096 -C “email@example.com“
When prompted enter a filename to save the keypair.Also enter the passphrase for the keys.
You will see a confirmation for generation of keypair.
The next step is to add generated private key to the SSH agent. Before adding ensure that SSH agent is running
Navigate the path where the key pairs are present. Then type this command.
It should prompt for the passphrase created with the key. Enter the passprase and you should get confirmation like below.
Now we have completed adding the private key portion of the key pairs to the SSK agent. The next
step is to add the public key portion of this keypair into the Github repository.
Navigate to the folder in Windows 10 PC where the key pairs are located. Copy the contents of public key file (.pub).
Paste the contents of the public key file to the key field.
Now we can navigate to the bash on windows 10 and start performing all the regular git bash commands.
This completes the set up for accessing Github private repositories from Windows 10 PC.