我在我的本地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就可以在本地机器上获取更改,以便能够部署我的代码。我完全被困在这里 - 任何人都有任何想法?
答案 0 :(得分:0)
结合来自user37078和Mark O'Connor的答案: