What to do when you have lost your gitosis rsa key

I’ve lost mine along with my windows partition when I caught a virus. Here is what to do:

Cryptographically secure pseudorandom number g...

Image via Wikipedia

 

  • Create a new rsa key on the client you intend to use: ssh-keygen -t rsa
  • Transfer the public key to the server, eg in /tmp
  • On the server: login as ‘git’ : sudo su; su – git
  • Clone the gitosis-admin repository locally: git clone /home/git/repositories/gitosis-admin.git /home/git/tmp/gitosis-admin
  • Go to /home/git/tmp/gitosis-admin and do the usual: add your new public key from /tmp to keydir and edit gitosis.conf to add that key to gitosis-admin project
  • Commit and push
  • Delete /home/git/tmp/gitosis-admin
  • Clone gitosis-admin from your client pc 🙂
Advertisements

One thought on “What to do when you have lost your gitosis rsa key

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s