SCM Sync配置插件未提交/推送 [英] SCM Sync configuration plugin doesn't commit/push
问题描述
我已经安装了SCM Sync配置插件(0.0.10),将我的jenkins设置保存在我的git存储库中.
I have installed SCM Sync configuration plugin(0.0.10) to save my jenkins settings in my git repository.
我已经设置了git url存储库,但是插件未提交/推送,请参见屏幕截图
I have set the git url repository but the plugin does not commit/push, see the screenshot
我尝试过:
- 私钥与
chmod 600
位于 - root用户是
id_rsa
和.ssh
目录的所有者 -
.ssh
目录具有权限700
- 我对
jenkins
OS用户做了相同的操作 - 我可以使用ssh私钥(从控制台)克隆存储库,因此这意味着一切正常
~/.ssh/id_rsa
中
- The private key is in
~/.ssh/id_rsa
with thechmod 600
- The root user is own of the
id_rsa
and the.ssh
directory - The
.ssh
directory has the permission700
- I did the same for
jenkins
OS user - I can clone the repository(from the console) using the ssh private key, so this means that everything is working
插件状态消息的屏幕截图
The screenshot of the plugin's status message
如您所见,该插件将所有文件复制到我认为该文件夹应该是git存储库的文件夹中.
as you can see, the plugin copy all the files to the folder that I imagine this folder should be the git repository.
插件网页( https://wiki.jenkins- ci.org/display/JENKINS/SCM+Sync+configuration+plugin ),我们可以看到相同的错误"和消息To use a Git server with SSH, you have to accept the server SSH key before using the plugin (same for using Git in Jenkins jobs).
,确定,但是我想我已经做到了.
The plugin webpage (https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin) we can see the same "error" and the message To use a Git server with SSH, you have to accept the server SSH key before using the plugin (same for using Git in Jenkins jobs).
, OK, but I guess I already did.
插件的故障排除说,它使用~/.ssh/
提交设置
The plugin's Troubleshootings says the it uses ~/.ssh/
to commit the settings
我真的很喜欢插件的想法,我想使用它,但是我不能.
I really like the plugin idea and I'd like to use it but I can't.
我在AWS上使用ubuntu 14.04,我的git存储库是bitbucket.
I use ubuntu 14.04 at AWS and my git repository is bitbucket.
怎么了?
推荐答案
我解决了这个问题,因为Jenkins使用的是OS用户Tomcat7
,所以无法正常工作,请检查Jenkins正在使用的OS用户. Jenkins Manage jenkins > System Information
中的选项,并查找user.name
,我的情况是tomcat7
.
I solved the issue, it didn't work because Jenkins was using the OS user Tomcat7
, to check what OS user the Jenkins is using just go to option in Jenkins Manage jenkins > System Information
and look for user.name
, my case was tomcat7
.
要解决此问题,只需检查用户的路径,就可以在user.home
中找到该路径,在我的情况下是/usr/share/tomcat7
,我只是将ssh密钥文件复制到/usr/share/tomcat7/.ssh
To solve just check the path of the user, the path can be found in user.home
, in my case was /usr/share/tomcat7
and I just copy the ssh key files to /usr/share/tomcat7/.ssh
文件是
- /usr/share/tomcat7/.ssh与
chmod 700
- /usr/share/tomcat7/.ssh/id_rsa和
chmod 600
- /usr/share/tomcat7/.ssh/id_rsa.pub和
chmod 600
- /usr/share/tomcat7/.ssh with
chmod 700
- /usr/share/tomcat7/.ssh/id_rsa with
chmod 600
- /usr/share/tomcat7/.ssh/id_rsa.pub with
chmod 600
我想id_rsa.pub(publick key)
不是必需的,此后,该插件可以与我的存储库同步.
I guess the id_rsa.pub(publick key)
is not necessary, after that, the plugin could sync with my repository.
这篇关于SCM Sync配置插件未提交/推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!