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

Dependency submission is forbidden with sbt #2526

Open
seblm opened this issue Oct 5, 2024 · 0 comments · May be fixed by #2530
Open

Dependency submission is forbidden with sbt #2526

seblm opened this issue Oct 5, 2024 · 0 comments · May be fixed by #2530

Comments

@seblm
Copy link
Contributor

seblm commented Oct 5, 2024

By default, Scala starter workflow define an optional job that submit dependencies to GitHub API. Unfortunately, it doesn't works out of the box because of contents permission defined to read. This is well documented into this section of the README.

Here is an example of a failed job:

Run scalacenter/sbt-dependency-submission@v3
  with:
    working-directory: scala/examples
    on-resolve-failure: error
    token: ***
    sbt-plugin-version: 3.1.0
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.4-7/x64
    JAVA_HOME_21_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.4-7/x64
/usr/bin/sbt --batch githubGenerateSnapshot {"ignoredModules":[],"ignoredConfigs":[],"onResolveFailure":"error","correlator":"Scala CI_build___scalacenter_sbt-dependency-submission"}; githubSubmitSnapshot
[info] welcome to sbt 1.10.2 (Eclipse Adoptium Java 21.0.4)
[info] loading settings for project examples-build from github-dependency-submission-9dbf7c50-01ca-498a-a66e-03a682e96911.sbt,plugins.sbt ...
[info] loading project definition from /home/runner/work/seblm.github.io/seblm.github.io/scala/examples/project
[info] loading settings for project root from build.sbt ...
[info] set current project to examples (in build file:/home/runner/work/seblm.github.io/seblm.github.io/scala/examples/)
[info] Resolving snapshot of scala/examples/build.sbt
[info] Setting Scala version to 3.5.1 on 1 projects.
[info] Reapplying settings...
[info] set current project to examples (in build file:/home/runner/work/seblm.github.io/seblm.github.io/scala/examples/)
[info] Including dependency graph of examples_3
[success] Total time: 2 s, completed Oct 3, 2024, 7:19:27 PM
[info] Dependency snapshot written to /tmp/dependency-snapshot-15460019313758566503.json
[info] Submitting dependency snapshot of job Job(Scala CI_build___scalacenter_sbt-dependency-submission, 11168310581, Some(https://github.com/seblm/seblm.github.io/actions/runs/11168310581)) to https://api.github.com/repos/seblm/seblm.github.io/dependency-graph/snapshots
[error] Unexpected status 403 Forbidden with body:
[error] {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository","status":"403"}
::error::Error: The process '/usr/bin/sbt' failed with exit code 1
seblm added a commit to seblm/starter-workflows that referenced this issue Oct 6, 2024
@seblm seblm linked a pull request Oct 6, 2024 that will close this issue
23 tasks
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

Successfully merging a pull request may close this issue.

1 participant