Configure Jenkins to connect to BitBucket

我的未来我决定 提交于 2019-12-01 02:11:47

Ok maybe I found the solution here: http://colonelpanic.net/2011/06/jenkins-on-mac-os-x-git-w-ssh-public-key/

Remember to re-generate the keys with:

ssh-keygen -t rsa 

to copy it with:

pbcopy <  /Users/Shared/Jenkins/Home//.ssh/id_rsa.pub

to upload it in BitBucket and run:

ssh git@bitbucket.org

in order to add bitbucket among the known hosts

I think the problem is in the permission for git. In the error log the command which is failing is

/usr/local/git/bin/git clone --progress -o origin git@bitbucket.org:myname/myproject.git/Users/Shared/Jenkins/Home/jobs/MyProjectAdHocBuild/workspace

If I try to run it in the console I get this:

fatal: could not create work tree dir '/Users/Shared/Jenkins/Home/jobs/MyProjectAdHocBuild/workspace'.: Permission denied

so if I run it in SUDO mode it works.

How can I give to Jenkings the permission to run git in Admin mode?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!