Skip to content

Location of the credentials file #1

Open

Description

@pankgeorg

This tool uses a file at $HOME/.juliahub to store credentials.

The reasons for that are:

  • do not specify the selected server again and again
  • follow the paradigm of npm, git, aws and other cli tools
  • "own" the credentials; i.e. not have them rewritten by a julia process running in the background

Having said that, jh run does copy these credentials to the well known location, while it also sets the JULIA_PKG_SERVER and JULIA_PKG_USE_CLI_GIT in the child process' so it will then use them.

Let's discuss improvements to this approach (i.e. remember the server in ~/.juliahub, but mkdir -p and store the credentials themselves in the well known location, or something similar)

Activity

  1. pankgeorg commented on Sep 9, 2025

    @pankgeorg
    MemberAuthor

    Avik: There are various tools that already look in the standard location; jh should work in our nodes. Reversely, julia should work with the credentials if we are logged in the jh tool.

    1. For the file lock concern, see Pkg; (mainly atomic copy).
    2. We should always get the latest refresh token (both in Pkg, jh and any julia user of the token (because refresh tokens expire (citation needed) 10 minutes after refreshing).

    To be a good refresh token citizen
    a. write the new refresh token immediately.
    b. with a file? atomic operations/pidfiles?
    c. read the latest latest refresh token (and lock until refresh is done)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions