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

Regression since 0.4.0: unable to use TokenSource.Environment("GITHUB_USERTOKEN") as an optional token source #19

Closed
stravissimo opened this issue Apr 21, 2020 · 1 comment

Comments

@stravissimo
Copy link

Related to #16

You can compose these using ||, which should resolve the issue, at least in theory

I have this in my project:

githubTokenSource in ThisBuild := TokenSource.GitConfig("github.token") || TokenSource.Environment("GITHUB_USERTOKEN") || TokenSource.Environment("GITHUB_TOKEN")

When I open sbt and peform update, I get following error:

(credentials) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)

I have the token present in the .githubconfig file, therefore I do not understand why it is trying to load it from GITHUB_TOKEN. The configuration has worked fine with 0.3.1 and 0.3.2, but not with 0.4.0

It is possible to define a dummy GITHUB_TOKEN environment variable as as a workaround.

@stravissimo
Copy link
Author

Bot account used to post the issue by mistake.

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

1 participant