MAC 下 Git的安装与基本配置
编程技术  /  houtizong 发布于 3年前   119
http://kernel.org/pub/software/scm/git/
tar xjvf git-1.8.4
./configure --prefix=/usr/localmake
sudo make install
git --version
which git
//检查SSH key cd ~/.ssh//备份已有的key mkdir key_backupmv id_rsa*key_backup
ssh-keygen -t rsa -C [email protected]//备注:后面的邮箱为注册github账号的邮箱运行之后,生成SSH key
Generating public/private rsa key pair. Enter file in which to save the key (/Users/chenyue123/.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: fb:c4:b0:e0:47:fd:be:e0:fb:ea:73:ef:a8:29:d5:22 [email protected] The key's randomart image is:+--[ RSA 2048]----+| || || || . || . S .. || . oE=o.. || . +o+.. || ..+.+.. || oOB=+o |+-----------------+
登录到GitHub页面,找到
Account Settings->SSH Public Keys->Add another key将生成的key(id_rsa.pub文件)内容copy到输入框中,save。
ssh [email protected]运行结果显示
The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes PTY allocation request failed on channel 0 Hi chenyue123! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.
//设置github默认用户名git config --global user.name "chenyue123"//设置github默认用户邮箱git config --global user.email "[email protected]"
git config --global color.ui true
//查看git的默认用户名git config user.name//查看git的默认邮箱git config user.email
//打印结果分别为//用户名chenyue123//邮箱[email protected]
请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成
网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];
文章归档
文章标签
友情链接