Search This Blog

Friday, October 4, 2013

Git clone - use different keys for different repositories / user another private key

To clone git repository with a different private key than your /home/user/.ssh/id_rsa

  1. Create a script called:
  2. Give the script executable permissions:

    chmod 777
  3. The contents of the script should look like the following:

    ssh -i /home/user/RSA_Keys/id_rsa $1 $2

  4. Export variable GIT_SSH:
    export GIT_SSH=~/
  5. Clone the repository as usual:

    git clone

No comments:

Post a Comment

If you like this post, please leave a comment :)