Unable to push RubyGem to Package Registry (The expected resource was not found) #24748
-
I’ve been able to push gems before but now for some reason I’m unable to? However, it was on my personal account and now I’m trying on an org account. I have my credentails stored and saved $ cat ~/.gem/credentials:rubygems_api_key: [key] But when I go to push it, using the following command: gem push --key github --host [https://rubygems.pkg.github.com/ORG] [REPO]-0.1.0.gem It fails, with this error: Pushing gem to https://rubygems.pkg.github.com/x… What should I do? I’ve already made sure to select way more scopes than I probably need At first I thought it might be the dashes in the repo name, however the previous push (that worked) has dashes. I’m out of ideas, what’s the situation here? We’re dealing with a 404 here, not a 401, so the error must have to do with some naming convention. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Did you ever figure this out? I’m having the exact same issue, things work fine for a personal repo but I get the same error trying to publish to an org repo. |
Beta Was this translation helpful? Give feedback.
-
Same here - It works for one of our org-private projects (and with org-private packages), but with the same config, it fails for another. Using an issuficient token raises a different error, so I suppose my token is ok. |
Beta Was this translation helpful? Give feedback.
-
Solved it with the help of the GH support. or me, it was the gem name in the spec - it has to match the name of the repository within your organisazion. So, for a repo great-org/foobar-baz , the gem needs to have the name ‘foobar-baz’ . Otherwise, GH packages seems to be unable to link back to your repo, giving you the somewhat misleading error message. |
Beta Was this translation helpful? Give feedback.
-
I had the same problem and + 1. For me the problem was an underscore in the repo name. As long the repo name was “ve_core” the push didn’t worked for me. After I renamed it to “ve-core” it worked fine. |
Beta Was this translation helpful? Give feedback.
-
this is truly annoying. that’s a huge fail |
Beta Was this translation helpful? Give feedback.
-
If someone stumbles on this:
|
Beta Was this translation helpful? Give feedback.
Solved it with the help of the GH support. or me, it was the gem name in the spec - it has to match the name of the repository within your organisazion.
So, for a repo
great-org/foobar-baz
, the gem needs to have the name
‘foobar-baz’
. Otherwise, GH packages seems to be unable to link back to your repo, giving you the somewhat misleading error message.