tag:help.rubygems.org,2010-01-19:/discussions/questions/71-switching-between-accounts-in-my-local-computerRubyGems.org: Discussion 2011-08-07T19:53:59Ztag:help.rubygems.org,2010-01-19:Comment/81945042011-07-29T15:23:37Z2011-07-29T15:23:53ZSwitching between accounts in my local computer<div><p>If you upgrade rubygems, there is a new <code>-k</code> option
that lets you specify which key to use. Just edit
<code>~/.gem/credentials</code> and drop in your api key in YAML
(follow the example there for another entry)</p>
<pre>
gem push --help
Usage: gem push GEM [options]
Options:
-k, --key KEYNAME Use the given API key
from ~/.gem/credentials
</pre></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/81945042011-08-07T13:48:00Z2011-08-07T13:48:02ZSwitching between accounts in my local computer<div><p>Thanks! I was finally able to push the gems.</p>
<p>One question though: it's not possible to have <em>both</em>
keys simultaneously active, is it?</p>
<p>For now, I have both on my credentials file and
comment/uncomment the keys as I need them.</p>
<p>Regards!</p></div>kikitotag:help.rubygems.org,2010-01-19:Comment/81945042011-08-07T19:53:58Z2011-08-07T19:53:58ZSwitching between accounts in my local computer<div><p>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.</p></div>Gabriel Horner