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

Bad Credentials in 4.0.1 #66

Open
balza opened this issue Feb 16, 2024 · 1 comment
Open

Bad Credentials in 4.0.1 #66

balza opened this issue Feb 16, 2024 · 1 comment

Comments

@balza
Copy link

balza commented Feb 16, 2024

Hello,
I've upgraded the library in Jenkins build agent image to the latest 4.0.1 from 3.0.3
I've upgraded only maven-dependency-submission-action and left all other configurations intact, with the following call

maven-dependency-tree-submission-linux -t "${GIT_TOKEN}" -r "az-italy/${REPOSITORY_NAME}" -b "refs/heads/${BRANCH}" --github-api-url "https://my-github.com/api/v3" -s "${COMMIT_SHA}" --ignore-maven-wrapper

now I get

"name": "maven-dependency-submission-action",%0A        "url": "https://github.com/advanced-security/maven-dependency-submission-action",%0A        "version": "4.0.1"%0A    }%0A}
::error::HTTP Status 401 for request POST https://api.github.com/repos/az-italy/alwaysbuild-maven/dependency-graph/snapshots
::error::Response body:%0A{%0A  "message": "Bad credentials",%0A  "documentation_url": "https://docs.github.com/rest"%0A}
::error::Bad credentials
::error::HttpError: Bad credentials%0A    at /snapshot/maven-dependency-submission-action/output/cli.js%0A    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)%0A    at async L (/snapshot/maven-dependency-submission-action/output/cli.js)
Failed to submit the dependency snapshot, check logs for more details, Error: Failed to submit snapshot: HttpError: Bad credentials
Error: Failed to submit snapshot: HttpError: Bad credentials
    at L (/snapshot/maven-dependency-submission-action/output/cli.js)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to submit snapshot: HttpError: Bad credentials

the library is trying to POST the snapshot to
https://api.github.com/repos/az-italy/alwaysbuild-maven/dependency-graph/snapshots
and not to my organization github's API

Thanks

@peter-murray
Copy link
Contributor

In version 4.0.3 this appears to work correctly now, can you verify?

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