Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Git clone with SSH keys

  • Author: Pedric Kng
  • Updated: 09 Mar 21

This article share how to generate a git SSH key, install it on windows and execute a git clone


  1. Generate the SSH keypair and store the key files as prompted e.g., C:\Users\you\.ssh

    # Generate the ras key pair
    ssh-keygen -t rsa -b 4096 -C "[email protected]"
  2. Check with your respective SCM on how to add the SSH public key accordingly.

  3. Add the ssh keys to the ssh agent accordingly.

    # Check that the agent is up and running
    eval $(ssh-agent)
    
    # Add the private key file generated previously.
    ssh-add ~/.ssh/id_rsa
    • In the event of exception "invalid format", it could because the format is not accepted.
      You can use PuttyGen[3] to convert the Conversions -> Export OpenSSH key
  4. Execute a git clone

    git clone [email protected]:cxdemosg/JavaVulnerableLab.git

References

Generating Your SSH Public Key [1]
Generating a new SSH key and adding it to the ssh-agent [2]
Puttygen [3]
How do I tell Git for Windows where to find my private RSA key? [4]