tag:help.rubygems.org,2010-01-19:/discussions/problems/30811-you-do-not-have-permission-to-pushRubyGems.org: Discussion 2018-09-23T09:19:06Ztag:help.rubygems.org,2010-01-19:Comment/448935362018-05-04T18:18:21Z2018-05-04T18:18:21ZYou do not have permission to push <div><p>Rahul,</p>
<ul>
<li>Is this still an issue?</li>
<li>You are listed as the owner as "<a href="mailto:oneness.univ@gmail.com">oneness.univ@gmail.com</a>"</li>
</ul></div>kerrizortag:help.rubygems.org,2010-01-19:Comment/448935362018-05-05T04:50:29Z2018-05-05T04:50:29ZYou do not have permission to push <div><p>Hi kerrizor,</p>
<p>I am aware that this gem's owner is <a href="mailto:oneness.univ@xxxxx.com">oneness.univ@xxxxx.com</a> (rkumar). But<br>
every effort to push this gem as that user is failing with the same error.</p>
<p>Here is what all I have tried:</p>
<p>git config user.email '<a href="mailto:oneness.univ@xxxxx.com">oneness.univ@xxxxx.com</a>'<br>
git config user.name 'rkumar'</p>
<p>gem push pkg/cetus-0.1.16.gem</p>
<p>Pushing gem to <a href="https://rubygems.org">https://rubygems.org</a>...<br>
You do not have permission to push to this gem. Ask an owner to add you<br>
with: gem owner cetus --add <a href="mailto:githubkepler.50s@xxxxxx.com">githubkepler.50s@xxxxxx.com</a></p>
<p>gem push pkg/cetus-0.1.16.gem -k 49d.....<br>
ERROR: No such API key. Please add it to your configuration (done<br>
automatically on initial <code>gem push</code>).</p>
<p>I get the same error if I try:<br>
gem push pkg/cetus-0.1.16.gem -k rkumar</p>
<p>gem push pkg/cetus-0.1.16.gem -k ~/.gem/credentials.rkumar</p>
<p>"rake release" gives the same error.</p>
<p>My .git/config file has user as "rkumar", and email as "oneness.univ....".</p>
<p>Would really appreciate if you could tell me how to get "rake release" to<br>
use "rkumar" instead of "kepler".</p>
<p>Thanks,<br>
Rahul Kumar</p></div>rahul2012tag:help.rubygems.org,2010-01-19:Comment/448935362018-05-05T06:46:26Z2018-05-05T06:46:26ZYou do not have permission to push <div><p>Run following and then try gem push:<br>
curl -u rkumar <a href="https://rubygems.org/api/v1/api_key.yaml">https://rubygems.org/api/v1/api_key.yaml</a> ><br>
~/.gem/credentials; chmod 0600 ~/.gem/credentials</p></div>sonalkr132tag:help.rubygems.org,2010-01-19:Comment/448935362018-05-06T03:10:37Z2018-05-06T03:10:37ZYou do not have permission to push <div><p>Thanks, I did run the above and it worked.<br>
But does this mean that each time I wish to switch the user, I will have to<br>
replace the credentials file. Somehow earlier this was working without a<br>
hitch, and the correct credentials file would be picked up.</p>
<p>Thanks a lot,<br>
Rahul Kumar</p></div>rahul2012tag:help.rubygems.org,2010-01-19:Comment/448935362018-05-19T20:02:57Z2018-09-23T09:19:06ZYou do not have permission to push <div><blockquote>
<p>But does this mean that each time I wish to switch the user,</p>
</blockquote>
<p>Are sure you switched your rubygems.org user? <code>~/.gem/credentials</code> holds the key we use to identify you for <code>gem</code> commands.<br>
EDIT: You can have multiple keys in your <code>~/.gem/credentials</code> and select them with <code>gem push -k work mygem</code>. Check: <a href="https://github.com/rubygems/rubygems.org/issues/152">https://github.com/rubygems/rubygems.org/issues/152</a></p>
<blockquote>
<p>Here is what all I have tried: git config user.email '<a href="mailto:oneness.univ@xxxxx.com">oneness.univ@xxxxx.com</a>' git config user.name 'rkumar' gem push pkg/cetus-0.1.16.gem</p>
</blockquote>
<p>gem command doesn't any have to do with your git user.<br>
I would suggest going through these docs[1][2] if you would like to learn more about sign in through command line and gem push.</p>
<p>[1] <a href="https://guides.rubygems.org/publishing/#publishing-to-rubygemsorg">https://guides.rubygems.org/publishing/#publishing-to-rubygemsorg</a></p>
<p>[2] <a href="https://guides.rubygems.org/command-reference/#gem-signin">https://guides.rubygems.org/command-reference/#gem-signin</a></p></div>sonalkr132