原文:http://www.linuxidc.com/Linux/2015-07/120617.htm
Jenkins中配置git仓库时,提示异常为 not connection *** HEAD。原因是本地为安装Git文件和公钥;
1.在Ubuntu系统中,直接在终端运行命令 sudo apt-get install git自动安装;
2.安装完成后配置 user.name And user.email ----->new a file name is repository;---> input "git init" command ,use this file update a Git repository---->输入ssh-keygen –t rsa命令生成ssh公钥(出现停顿按回车即可)
3.repository目录下新建一个目录gitadmin,,将代码从 oschina 通过http的方式clone下来,下面是clone成功的界面;
然后在Jenkins中配置远程地址,解决问题