-
Notifications
You must be signed in to change notification settings - Fork 27
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
unable to locate a valid GitHub token from Environment(GITHUB_TOKEN) #26
Comments
Are you using IntelliJ? |
Yes. |
I think you're being afflicted by #24 then. |
I have the same issue, but unable to fix with the work-around. I have tried multiple variations of below in my publishMavenStyle := true
githubOwner := "andrewresearch"
githubRepository := "core"
githubTokenSource := TokenSource.GitConfig("github.token") || TokenSource.Environment("GITHUB_TOKEN")
credentials +=
Credentials(
"GitHub Package Registry",
"https://maven.pkg.github.com",
"andrewresearch",
sys.env.getOrElse("GITHUB_TOKEN", "N/A")
) |
I find that the plugin seems to have a hard-coded bias for the We seek a tactic that offers a proper OR to handle the case where some build systems do not set environment variables. We discover that this tactic does work with simpler SBT build.sbt files but it is not working with a more complex one that includes multiple built products (whatever sbt calls the intermediate builds). |
Hi, does anyone know how to solve this error? |
The fact that you "redded" out the TokenSource.Environment("SOME_ENVIRONMENT_VARIABLE_IN_WHICH_YOU_STORE_THE_TOKEN") and then in your SOME_ENVIRONMENT_VARIABLE_IN_WHICH_YOU_STORE_THE_TOKEN=the_token_itself |
It works. Thank you for your help! |
unable to locate a valid GitHub token from Environment( GITHUB_TOKEN)sbt:random-quotes> run i ca't understand why it can't locate my github_token. my ~/.sbt/1.0/github.sbtcredentials += here I attached my project link |
@vazand not sure what's wrong then. I've started switching over to Mill, let's see if the grass is greener on the other side 😉 |
Hey @vazand, pls export GITHUB_TOKEN first in before |
okay I'll check. |
Hi @vazand are you able to fix the issues? |
I am getting the below error - [info] Wrote /home/knoldus/workstation/knoldus_aws_lib/kinesis-service/target/scala-2.13/kinesis-service_2.13-1.0.pom [error] java.io.IOException: PUT operation to URL https://maven.pkg.github.com/piyushknoldus/knoldus_aws_lib/knoldus/kinesis-service_2.13/1.0/kinesis-service_2.13-1.0.pom failed with status code 404: Not Found; Response Body: The expected resource was not found. my build.sbt setting -
|
I attempt to use sbt-github-package for firs time for my project. I attempt to import apply the plugin in my
plugins.sbt
fileaddSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.2")
However, this result to the errors below
Error while importing sbt project:
[info] welcome to sbt 1.3.12 (Oracle Corporation Java 1.8.0_102)
[info] loading settings for project amadeus-sabre-mutli-gds-build from plugins.sbt ...
[info] loading project definition from /Users/brakket/projects/travel-sdk-api/open-source/amadeus-sabre-mutli-gds/project
[info] loading settings for project root from build.sbt ...
[info] loading settings for project flight from build.sbt ...
[info] loading settings for project common from build.sbt ...
[info] set current project to amadeus-sabre-multi-gds (in build file:/Users/brakket/projects/travel-sdk-api/open-source/amadeus-sabre-mutli-gds/)
[info] sbt server started at local:///Users/brakket/.sbt/1.0/server/f624faec50c66cc67b35/sock
sbt:amadeus-sabre-multi-gds>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile, shellPrompt
[info] The new values will be used by no settings or tasks.
[info] Reapplying settings...
[info] set current project to amadeus-sabre-multi-gds (in build file:/Users/brakket/projects/travel-sdk-api/open-source/amadeus-sabre-mutli-gds/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/brakket/Library/Application Support/IntelliJIdea2018.2/Scala/launcher/sbt-structure-1.0.jar
[info] Reapplying settings...
[info] set current project to amadeus-sabre-multi-gds (in build file:/Users/brakket/projects/travel-sdk-api/open-source/amadeus-sabre-mutli-gds/)
[warn] undefined keys
githubOwner
andgithubRepository
[warn] retaining pre-existing publication settings
[error] stack trace is suppressed; run 'last common / credentials' for the full output
[error] stack trace is suppressed; run 'last credentials' for the full output
[error] stack trace is suppressed; run 'last flight / credentials' for the full output
[error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output
[error] stack trace is suppressed; run 'last flight / ssExtractDependencies' for the full output
[error] stack trace is suppressed; run 'last common / ssExtractDependencies' for the full output
[error] (common / credentials) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] (credentials) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] (flight / credentials) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] (ssExtractDependencies) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] (flight / ssExtractDependencies) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] (common / ssExtractDependencies) unable to locate a valid GitHub token from Environment(GITHUB_TOKEN)
[error] Total time: 0 s, completed Jun 29, 2020 1:14:06 AM
[info] shutting down sbt server
I have stored the GITHUB_TOKEN in my environment variable. However, this's still result to failure.
I'll appreciate all efforts to resolving this issue.
The text was updated successfully, but these errors were encountered: