【发布时间】:2013-12-29 10:11:02
【问题描述】:
我在这里发布了我的第一个 rubygem:https://rubygems.org/gems/blomming_api (此处源代码:https://github.com/solyaris/blomming_api)
我使用了 bundler,它使用bundle gem 命令创建了三个 rake 任务:
$ rake -T
rake build # Build blomming_api-0.3.7.gem into the pkg directory
rake install # Build and install blomming_api-0.3.7.gem into system gems
rake release # Create tag v0.3.7 and build and push blomming_api-0.3.7.gem to Rubygems
如果使用 rake install 在本地安装 gem,一切都很好:
$ rake install
blomming_api 0.3.7 built to pkg/blomming_api-0.3.7.gem.
blomming_api (0.3.7) installed.
当我尝试发布时出现问题:
$ rake release
blomming_api 0.3.7 built to pkg/blomming_api-0.3.7.gem.
Tagged v0.3.7.
Untagging v0.3.7 due to error.
rake aborted!
Couldn't git push. `git push 2>&1' failed with the following output:
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:104:in `perform_git_push'
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:96:in `git_push'
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:77:in `block in release_gem'
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:129:in `tag_version'
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:77:in `release_gem'
/home/solyaris/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:50:in `block in install'
Tasks: TOP => release
(See full trace by running task with --trace)
尽管如此,我还是可以通过 gem push 命令成功发布 gem:
$ gem push pkg/blomming_api-0.3.7.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: blomming_api (0.3.7)
我认为问题出在 git push 远程配置上... 有什么想法可以帮助我配置 git 以让 rake 发布运行?
顺便说一句,我已经在 /home/solyaris/.gem 上配置了我的 rubygems 凭据 和 git push 在 github 上运行正常。 我知道......我的 git 不情愿是很大的 ;-) 谢谢 乔治
【问题讨论】:
标签: ruby git rubygems gem bundler