Mac OS X Git安装教程

http://code.google.com/p/git-osx-installer上也提供了一个Git的图形化客户端:OpenInGitGui,可以从这里获得,OpenInGitGui十分小巧,下载解压后也只有16K,OpenInGitGui不用安装,双击即可使用,OpenInGitGui刚启动时,会记录打开过的资源库。

github使用SSH链接,需要设置SSH

1.检查SSH key

     cd ~/.ssh

2.备份已有的key,(如果有的话)

     mkdir key_backup

     mv id_rsa* key_backup

3.生成SSH key

$ ssh-keygen -t rsa -C x.kristain@gmail.com

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/kristain/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in yes.

Your public key has been saved in id_rsa.pub.

The key fingerprint is:

9e:10:27:3c:7c:64:b9:12:b3:7f:a8:1a:8e:59:26:ea x.kristain@gmail.com

The key's randomart image is:

+--[ RSA 2048]----+

|                 |

|                 |

|                 |

|         .       |

|      . S ..     |

|     . oE=o..    |

|      . +o+..    |

|       ..+.+..   |

|         oOB=+o  |

+-----------------+

4.将SSH key添加到GitHub

登录到GitHub页面,Account Settings->SSH Public Keys->Add another key

将生成的key(id_rsa.pub文件)内容copy到输入框中,save。

5.测试链接

$ ssh -T git@github.com

Hi kristain! You've successfully authenticated, but GitHub does not provide shell access.

出现上述提示信息说明连接成功(github并不提供shell登陆但已经连接成功)

三、设置个人信息

$ git config --global user.name "kristain"

$ git config --global user.email x.kristain@gmail.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值