Git client and configuration for accessing private repositories via SSH in

A lot of software projects use Git for source control, for example, hosted on Github. We will install and configure a git client that is free and open source and is available at:

It is possible to install via Windows package manager Winget, but I will use the manual download and configuration during installation process.

In the main page click in “Download for Windows”

Then in Click here to download if not started automatically.

Make sure you understand the license agreement and if you agree with the terms, click Next.

Select the location to install and click Next.

In my setup I select all the options, but leave the creation of the desktop icon not checked.

I leave the default name for the start menu folder and click in Next.

Here, I use Visual Studio Code, which I have installed with instructions in the post Visual Studio Code and some essential extensions – Fernando Silva and click Next.

I use the default option for git init and click Next.

I also leave the default option for PATH environment and click Next.

Again, for SSH client, default option and Next.

For HTTPS, default OpenSSL library then Next.

I don’t use conversions for line ending, so “Checkout as-in, commit as-is” selected, then Next.

For Git Bash I also leave as default and Next.

Same for git pull behavior, default then Next.

For credential helper I leave as default enabled and then Next.

In the next window, I use Enable symbolic links in addition to file system caching and then Next.

I don’t use any experimental options, just click Install.

Installation will take a few moments…

Once completed, select “Launch Git Bash” and click Finish.

The following window will open:

Now we configure the user name and email:

git config --global "<first_name> <last_name>"
git config --global "<user>@<domain>"

In case of handling private repo’s in GitHub and intended to connect via SSH, use the following links:

Generating a new SSH key and adding it to the ssh-agent – GitHub Docs

Adding a new SSH key to your GitHub account – GitHub Docs

Testing your SSH connection – GitHub Docs

The steps should be something like:

ssh-keygen -t ed25519 -C "<user>@<domain>"

You will be prompted to enter the filename to save the ssh key:

Select something like the example, replacing with the current username:


Then copy the content of the output of the following command and add it to your GitHub settings – SSH and GPG keys:

cat ~/.ssh/

Note: You can include to both Authentication Key and Signing Key if you plan to use SSH for everything instead of GPG for signing.

Load the agent and add your new key to the keyring:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github

Now it should be possible to test the connection:

ssh -T

If you see
“This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?”
reply Yes and hit Enter.

If configuration was done correctly you should see the output of the greeting from the server in your console.

Hi <username>! You’ve successfully authenticated, but GitHub does not provide shell access.

If commiting to GitHub repositories that require verified commits, use the following links if you plan to use the SSH :

Telling Git about your signing key – GitHub Docs

Signing commits – GitHub Docs

Then tell git to use your SSH key as signing key and, optionally, to auto-sign commits:

git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/

If you want to always sign commits, include this configuration:

git config --global commit.gpgsign true

Note: If you also commit to other repositories with other keys you must change the key you are using or instead of doing the commit.gpgsign setup above, you can sign each commit by using the following when commiting the changes:

git commit -S -m "Your commit message"

Now git client is fully functional to both clone and push changes to repositories, public and private.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s