Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 HTTP github Gem引用在Jenkins构建中失败_Ruby On Rails 3_Github_Jenkins_Bundler - Fatal编程技术网

Ruby on rails 3 HTTP github Gem引用在Jenkins构建中失败

Ruby on rails 3 HTTP github Gem引用在Jenkins构建中失败,ruby-on-rails-3,github,jenkins,bundler,Ruby On Rails 3,Github,Jenkins,Bundler,我在github中托管了一个私有的ruby gem,我在Gemfile中配置了它以支持https 这条线看起来像这样: gem 'gemname', :git => 'https://USERNAME:PASSWORD@github.com/Organizartion/gemname.git', :branch => 'develop' 嵌入用户名/密码的原因是,我们正在部署到Heroku,Heroku不允许用户代理转发,因此我们必须通过HTTPS获取gem,并且必须在请求中传递u

我在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

以前有人遇到过这个问题吗?

您可以从github以只读方式克隆repo,而无需用户名和密码。我认为这将是一种更好的方法,除非您将github用于私有存储库。如果有帮助,您还可以在HTTPS下以只读方式签出公共回购协议。在任何情况下,如果您需要写入权限,您可以轻松地更改签出的.git配置,以便稍后指向读/写repo。

您可以从github以只读方式克隆repo,而无需用户名和密码。我认为这将是一种更好的方法,除非您将github用于私有存储库。如果有帮助,您还可以在HTTPS下以只读方式签出公共回购协议。在任何情况下,如果您需要写入权限,您可以轻松地更改签出的.git配置,以便稍后指向读/写repo。

您正在运行哪个版本的Jenkins。1.1.6之前的版本中有一个错误,密码为https://username:password type of clone(请参阅)1.431,所以可能不是这样,但有一个更新,所以我还是会尝试一下。您运行的是哪个版本的Jenkins。在1.1.6之前的版本中有一个错误,密码为https://username:password type of clone(请参阅)1.431,所以可能不是这样,但有一个更新,所以我无论如何都会尝试。很遗憾,这是一个私有回购,因此是un/pw要求。很遗憾,这是一个私有回购,因此是un/pw要求。