or Create a profile
26 Jun, 2011 09:58 PM
I have two different accounts on rubygems (one for my personal
projects, one for my company work). I must "switch" from one to the
other, otherwise I get a "you are not authorized to push" error
when trying to push a gem.
It's been a long time since I pushed a gem for my company and
I've forgotten what I had to do in order to "switch contexts" in my
I've spent one hour looking for information on how to switch,
but I could not find information on it.
What commands / config files do I have to use to tell my
computer "I am now user xxx on rubygems, let me push"?
Thanks a lot
2 Posted by Nick Quaranto on 29 Jul, 2011 03:23 PM
If you upgrade rubygems, there is a new -k option
that lets you specify which key to use. Just edit
~/.gem/credentials and drop in your api key in YAML
(follow the example there for another entry)
gem push --help
Usage: gem push GEM [options]
-k, --key KEYNAME Use the given API key
3 Posted by kikito on 07 Aug, 2011 01:48 PM
Thanks! I was finally able to push the gems.
One question though: it's not possible to have both
keys simultaneously active, is it?
For now, I have both on my credentials file and
comment/uncomment the keys as I need them.
4 Posted by Gabriel Horner on 07 Aug, 2011 07:53 PM
It's not possible to have both active. But as Nick pointed out,
you can switch between keys with -k with recent versions of
rubygems. Feel free to reopen if you have more questions.
Gabriel Horner closed this discussion
on 07 Aug, 2011 07:53 PM.
Comments are currently closed for this discussion.
You can start a new one.
3 people watching.
No more actions from RubyGems.org or the discussion starter are required.
This discussion is private.
Only you and RubyGems.org support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
Powered by Tender™.