Monday 26 March 2012

Configure remote access to git without erasing your existing keys

This is a solution if you'd like to connect to github using ssh (typical for read-write access to a repository) but you don't want to delete an existing ssh key (e.g., id_rsa) as requested in the git instructions. On ubuntu, I did it like this:

$ cd .ssh
$ ssh-keygen -t rsa -C "myemail@place.com"
Enter file in which to save the key (/home/username/.ssh/id_rsa): github_rsa
Enter a passphrase: your secret phrase

Copy the public key file ~/.ssh/github_rsa.pub to your github.com ssh settings.

Edit the file .ssh/config, and add the following entry (or create a new file if it doesn't currently exist)

Host github
  Hostname github.com
  User git
  IdentityFile ~/.ssh/github_rsa

Then, I had to do
$ ssh-add ~/.ssh/github_rsa
to get rid of an "Agent can't sign error"

Then, if you do
$ ssh -T github

you should see
Hi rhodricusack! You've successfully authenticated, but GitHub does not provide shell access.

Then you can do
git clone github:/rhodricusack/automaticanalysis

13 comments:

  1. These post was definitely going to be very useful to many and to each an ever visitor of the blog. Thanks a lot for sharing such valuable and important information.

    remote pc access software

    ReplyDelete
  2. Very nice post. I definitely appreciate this site. Stick with it!
    كشف تسربات المياه


    Prokr.org


    كشف تسربات المياه بمكة


    Prokr.com


    شركة كشف تسربات المياه بالدمام


    Albyaan.com


    كشف تسربات وعزل بالمدينة


    Abozahra.com

    ReplyDelete
  3. An outstanding share! I've just forwarded this onto a friend who has been conducting a little research on this.

    عقاري جدة
    http://3kary.com/
    شقق مفروشة بجدة
    http://3kary.com/property-status/monthly-apartments-for-rent/
    شقق عزاب بجدة
    http://3kary.com/property-status/apartments-bachelors/

    ReplyDelete
  4. ممتاااااااااااااااااااااااااااااااز عملك
    http://el-tamimi.com/legal-consultants/
    http://el-tamimi.com/divorce-lawyer/
    http://el-tamimi.com/best-lawyer/












    ReplyDelete
  5. Good day! I could have sworn I’ve been to this site before but after looking at many of the articles I realized it’s new to me.


    prokr.com





    3idat.com/jeddah/





    http://3kary.com/



    ReplyDelete

  6. مع المتخصصين لدينا لحلول النقل المصممة خصيصا نحن نقدم لك دائما في شركة نقل عفش بجدة
    الطريق الصحيح. ونتيجة لذلك: تقرير سريع للمشاكل وفترة رد الفعل القصير
    وأفضل الحلول. مع نجاح كلي - يثبت لنا والخدمات التي نقدمها. وسيتم مكافأة ثقتكم! شركة نقل اثاث بجدة باسعار مميزة جدا

    ReplyDelete