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

fatal: could not read Username for 'https://github.com': No such file or directory #69

Open
felickz opened this issue Nov 17, 2022 · 2 comments

Comments

@felickz
Copy link

felickz commented Nov 17, 2022

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?

@adpi2
Copy link
Member

adpi2 commented Nov 18, 2022

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?

@jackgkafaty
Copy link

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 }}

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

3 participants