使用git结合backlog

post by rocdk890 / 2012-11-9 16:39 Friday linux技术
1.生成公钥和私钥
$ ssh-keygen -t rsa

输入以上命令会出现下列提示信息
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/ito_kazunori_gn/.ssh/id_rsa):
Created directory '/Users/ito_kazunori_gn/.ssh'.
Enter passphrase (empty for no passphrase):(可以为空)
Enter same passphrase again:
Your identification has been saved in /Users/ito_kazunori_gn/.ssh/id_rsa.
Your public key has been saved in /Users/ito_kazunori_gn/.ssh/id_rsa.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ito_kazunori_gn@PC-4828.local

生成完成后
通过 more /Users/ito_kazunori_gn/.ssh/id_rsa.pub获得公钥
把里面的字符传拷贝在backlog,ssh设定的地方即可。

2.生成配置文件
vi ~/.ssh/config
配置文件中输入下列信息后保存
Host easter.git.backlog.jp
  Usereaster
  IdentityFile ~/.ssh/id_rsa_backlog_git


3.mv ~/.ssh/id_rsa  ~/.ssh/id_rsa_backlog_git

4.测试连接是否成功
ssh backlog.jp
若成功会出现下列提示信息
The authenticity of host 'easter.git.backlog.jp (54.248.107.22)' can't be established.
RSA key fingerprint is 25:c4:1e:3b:c9:5e:d9:7b:e3:3f:d5:3d:ac:84:c8:4d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'backlog.jp,54.248.107.22' (RSA) to the list of known hosts.
Hi kazunori.ito@sina.com! You've successfully authenticated, but Backlog does not provide shell access.
Connection to easter.git.backlog.jp closed


5.创建项目工作目录
mkdir ~/Document/project/git
cd ~/Document/project/git


6.git配置文件定义
git config --global user.name "username"
git config --global user.email "usermail"

上面两个配置可以随便写,但是这个对你身份的标识,通过这个标识别人通过log可以看到是谁提交的。

7.从远程服务器到处仓库
git clone backlog.jp/XXX.git

备注:
1.如果仅仅使用git,不关联backlog的话,可以省略2,3步.
2.第4步只是测试,对安装工作无影响。
夜空- 本站版权
1、本站所有主题由该文章作者发表,该文章作者与夜空享有文章相关版权
2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和夜空的同意
3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、原文链接:blog.slogra.com/post-276.html

标签: linux git backlog

评论: