Git – Generate Public Key for GitHub Using msysgit

Recently i have created a GitHub account. In order to push files to the GitHub Repository, i have to generate a key pair for authentication. For Windows users, you could use msysgit for the key generation purpose.

1. Download the msysgit installer at msysgit project website

2. Run the installer to install the msysgit

3. Start the msysgit shell by double click the msys.bat in the installation folder

4. Generate the key by the following command

  • ssh-keygen -t rsa -C “<your email address>”


5. The following files are created at ~/.ssh


6. Open the public key by a Text Editor

7. Copy the all the content and add it as a public key in your GitHub account

8. Verify the key by ssh to


Done =)

Reference: Generating SSH keys (Win/msysgit)


One thought on “Git – Generate Public Key for GitHub Using msysgit”

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.