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

Alternative to SRC_ACCESS_TOKEN if dotfiles are kept under version control? #1101

Open
adamliter opened this issue Jul 10, 2024 · 1 comment

Comments

@adamliter
Copy link

adamliter commented Jul 10, 2024

Is there a good alternative to specifying SRC_ACCESS_TOKEN in a dotfile, particularly if your dotfiles are kept under version control and pushed to a remote repository? Right now I'm doing this in my ~/.profile which works, but this means I am asked for my GPG password every time I start a new shell:

if command -v gopass 1>/dev/null 2>&1; then
    export SRC_ACCESS_TOKEN=$(gopass show sourcegraphcloud.com/token)
fi
@zoidyzoidzoid
Copy link

This isn't necessarily Sourcegraph-specific, but you could have a function like enable_sourcegraph that ran the export and prompted for the password only when you need it.

Not sure if any shells have a way to instantiate an environment variable when it's first read.

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

No branches or pull requests

2 participants