Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showing location of credentials #8373

Open
ahoward opened this issue Dec 25, 2024 · 3 comments
Open

showing location of credentials #8373

ahoward opened this issue Dec 25, 2024 · 3 comments

Comments

@ahoward
Copy link

ahoward commented Dec 25, 2024

I am at a loss debugging and issue.... I was having auth issues (wrong key scope) and eventually worked around this. However, I in the process I discovered that my .gem/credentials were not, in fact, stored in the location but, instead, where stored in .local/share/gem/

I cannot seem to find any reference to this online, or in the code so, I am befuddled.

  1. Any thoughts on why gem signin would produce credentials there, instead of the normal spot and
  2. Is there (there should be) a way to display which credentials location the gem command is using?

TY!

@ahoward ahoward added the bug label Dec 25, 2024
@colby-swandale
Copy link
Member

Moving this to the rubygems CLI repository

@colby-swandale colby-swandale transferred this issue from rubygems/rubygems.org Dec 29, 2024
@duckinator
Copy link
Member

duckinator commented Dec 30, 2024

Hi! This change happened a few years ago, when we started following the XDG standard. It should definitely be documented.

In practice, you can think of it as RubyGems and Bundler checking these 3 directories and going with the first they can use:

  • if it exists: $HOME/.gem/ (for backwards compatibility)
  • if $XDG_DATA_HOME is defined: $XDG_DATA_HOME/gem/ (to follow the XDG standard)
  • in all other situations: $HOME/.local/share/gem/ (also to follow the XDG standard)

If you want to use the old .gem directory, just make sure it exists.

(For anyone who's interested, the relevant code for this in Gem.user_dir and Gem.home, both in lib/rubygems/defaults.rb.)

@ahoward
Copy link
Author

ahoward commented Dec 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants