【发布时间】:2012-01-25 23:29:40
【问题描述】:
我有一个托管在 github 中的私有 ruby gem,我已在我的 Gemfile 中配置它来拉取 https。
这条线看起来像这样:
gem 'gemname', :git => 'https://USERNAME:PASSWORD@github.com/Organizartion/gemname.git', :branch => 'develop'
嵌入用户名/密码的原因是我们正在部署到 Heroku,而 Heroku 不允许用户代理转发,因此我们必须通过 HTTPS 拉取 gem,并且必须在请求中传递 un/pw。
这很好地部署到 heroku,但是当我运行我的 jenkins 构建时,我得到了这个错误。
Fetching https://USERNAME:PASSWORD@github.com/OrganizationName/gemname.git
fatal: https://USERNAME:PASSWORD@github.com/OrganizationName/gemname.git/info/refs download error - The requested URL returned error: 403
[31mGit error: command `git clone 'https://USERNAME:PASSWORD@github.com/OrganizationName/gemname.git' "/var/jenkins/.rvm/gems/ruby-1.9.2-p290@gemset/cache/bundler/git/gemname-cbda297ed261fcb09cf9d2c19ff525a89feb4294" --bare --no-hardlinks` in directory /var/jenkins/workspace/ProjectDevelopment has failed.[0m
以前有人遇到过这个问题吗?
【问题讨论】:
-
您运行的是哪个版本的 Jenkins。在 1.1.6 之前的版本中存在一个错误,密码为 https:// username:password 克隆类型(请参阅 issues.jenkins-ci.org/browse/JENKINS-3807 )
-
1.431 所以可能不是它,但有一个更新,所以无论如何我都会尝试。
标签: ruby-on-rails-3 github jenkins bundler