2

我在本地 linux 机器上使用 Jenkins。我有一个本地 git 存储库,它也使用 bitbucket 作为其来源。

我试图让 Jenkins 从本地 git 存储库构建,但每次构建时,都会出现以下错误:

Started by user Hippyjim 
Building in workspace /var/lib/jenkins/workspace/Staging
Checkout:Staging / /var/lib/jenkins/workspace/Staging - hudson.remoting.LocalChannel@15c0729
Using strategy: Default
Checkout:Staging / /var/lib/jenkins/workspace/Staging - hudson.remoting.LocalChannel@15c0729
Fetching changes from 1 remote Git repository
Fetching upstream changes from /home/hippyjim/PhpstormProjects/myRepo/.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: git fetch -t /home/hippyjim/PhpstormProjects/myRepo/.git +refs/heads/*:refs/remotes/origin/*
Command "git fetch -t /home/hippyjim/PhpstormProjects/myRepo/.git +refs/heads/*:refs/remotes/origin/*" returned status code 255: error: cannot open    .git/FETCH_HEAD: Permission denied

如果我运行它在错误消息中给出的克隆命令,它工作正常。我只需要 Jenkins 来获取这台本地机器上的更改,以便能够部署我的代码。我完全被困在这里 - 有人有任何想法吗?

4

1 回答 1

0

结合 user37078 和 Mark O'Connor 的答案:

  • Jenkins 以什么用户身份运行?
  • 是否从 /home/hippyjim/PhpstormProjects/myRepo 克隆(和/或获取)到其他地方进行构建?
  • “权限被拒绝”错误表明这是用户访问问题
于 2013-04-30T13:34:52.550 回答