sbt-dependency-submission
sbt-dependency-submission copied to clipboard
fatal: could not read Username for 'https://github.com': No such file or directory
For dependencies that reference a private repo via plugin (example here)..
Is the token input intended to resolve this error or will a git config need to be added to specify a token for each repo?
Thanks for opening this issue!
It is likely indeed that sbt cannot use the token input to resolve private git repositories. But I would like to make it work.
Does anyone know how to solve this?
Hi @adpi2 & @felickz!
To solve this issue you must add the following step which is needed to for git clone to work in this scenario.
steps:
- name: Configure git
env:
TOKEN: ${{ secrets.PAT }}
run: git config --global url."https://${TOKEN}:[[email protected]](mailto:[email protected])/".insteadOf "https://github.com/"
name: Scala Dependency Graph Generation for Dependabot
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
dependency-graph:
name: Update Dependency Graph
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
security-events: write
steps:
- name: Configure git
env:
TOKEN: ${{ secrets.PAT }}
run: git config --global url."https://${TOKEN}:[[email protected]](mailto:[email protected])/".insteadOf "https://github.com/"
- uses: actions/checkout@v3
- uses: scalacenter/[email protected]
with:
token: ${{ secrets.PAT }}