gpt4 book ai didi

ruby-on-rails-3 - bundle : Install gem from private github repository

转载 作者:行者123 更新时间:2023-12-03 11:56:09 26 4
gpt4 key购买 nike

我在从 git 私有(private)存储库 bundle gem 时遇到了麻烦:

gem 'test', :git => 'git://github.com/my_account/test.git'

myapp_folder$ bundle --verbose
Fetching git://github.com/my_account/test.git
fatal: The remote end hung up unexpectedly
Git error: command `git clone 'git://github.com/my_account/test.git' "/Library/Ruby/Gems/1.8/cache/bundler/git/test-7b1f0bd821d503c9d6d421d89c56850dad44c15a" --bare --no-hardlinks` in directory /Users/.../myapp_forlder has failed.
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/source.rb:583:in `git'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/source.rb:652:in `cache'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/source.rb:550:in `specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:356:in `converge_locked_specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:345:in `each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:345:in `converge_locked_specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:143:in `resolve'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:90:in `specs'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/definition.rb:85:in `resolve_remotely!'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/installer.rb:43:in `run'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/installer.rb:8:in `install'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/cli.rb:220:in `install'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `send'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `run'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor.rb:263:in `dispatch'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/base.rb:386:in `start'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/bin/bundle:13
/usr/bin/bundle:19:in `load'
/usr/bin/bundle:19
它可以完美地与推/拉/任何私有(private)克隆本身配合使用。
它与 bundle 我的公共(public) github 存储库完美配合。
我在 Mac OS 上使用 bundle v 1.0.18
我还尝试制作一些 git clone my_private_repo,它询问我的帐户密码。这是正常的还是应该查看我的 ssh 配置并查看我已经有权访问。
可能是重点,但我不知道如何在这个问题上进一步挖掘。

最佳答案

使用“SSH”或“HTTP” URL 访问您的私有(private)存储库。例如:

# HTTP (I've found this to be more reliable)
gem 'test', :git => 'https://my_account@github.com/my_account/test.git'
# SSH
gem 'test', :git => 'git@github.com:my_account/test.git'

不过,不要猜他们。您可以通过转到您的 github 存储库页面来获取它们......顶部有三个选项。

如果询问,输入密码是正常的。

关于ruby-on-rails-3 - bundle : Install gem from private github repository,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7094696/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com