Skip to content

fatal: could not read Username for 'https://github.com': No such device or address #146

Closed

Description

@coderaiser

Thank you for such a useful action :). It worked well, but today I trapped on an issue.

Describe the bug
Job is failed, action cannot push to repository.

Workflow used

Internal logs
  > Staging files...
  > Adding files...
  > No files to remove.
  > Checking for uncommitted changes in the git working tree...
  > Found 1 changed files.
  { raw: '', remote: null, branches: [], tags: [] }
  > Switching/creating branch...
  M	package.json
  Branch 'master' set up to track remote branch 'master' from 'origin'.
  
  > Pulling from remote...
  { raw: '', remote: null, branches: [], tags: [] }
  PullSummary {
    remoteMessages: RemoteMessageSummary { all: [] },
    created: [],
    deleted: [],
    files: [],
    deletions: {},
    insertions: {},
    summary: { changes: 0, deletions: 0, insertions: 0 }
  }
  > Re-staging files...
  > Creating commit...
  {
    author: null,
    branch: 'master',
    commit: 'd05199db',
    summary: { changes: 1, insertions: 1, deletions: 2 }
  }
  > No tag info provided.
  > Pushing commit to repo...
  Error: Error: Pushing to https://github.com/coderaiser/putout
  fatal: could not read Username for 'https://github.com': No such device or address
  
Outputs
  committed: true
  pushed: false
  tagged: false
Error: Error: Pushing to https://github.com/coderaiser/putout
fatal: could not read Username for 'https://github.com': No such device or address

Here is current config.

Expected behavior
I expect that fixes will be pushed to repo.

Activity

  1. EndBug commented on Feb 19, 2021

    @EndBug
    Owner

    Hi, I've tried to reproduce your issue and I think that it might be caused by the fact that you're running the action on every run of the matrix, and GitHub might have some issues with that (I'm able to reproduce the error using a matrix strategy).
    I think that it's better if you run your tests on the matrix, then you can run another job dedicated to linting & stuff (I think it would be better anyway, even if everything worked fine).

    Let me know if you're able to solve the issue!

  2. coderaiser commented on Feb 19, 2021

    @coderaiser
    Author

    Could you please help me, what should I change to run job dedicated to linting after matrix?

  3. added
    type: questionFurther information is requested
    and removed
    status: pendingMore info is needed before deciding what to do
    on Feb 19, 2021
  4. EndBug commented on Feb 19, 2021

    @EndBug
    Owner

    You could have a job that only runs tests (which in your case seem to only be running the build), and that will use the matrix strategy.

    Then you can create a second job, with all the steps that you need to use to update the repo, which include my action. This second job should run only once, with no matrix.

    Here's the outline of the workflow:

    jobs:
      test:
        strategy:
          matrix:
            node-version: [14.x, 15.x]
        steps:
        # checkout, node, ...
    
      lint:
        steps:
        # run linter, add-and-commit, ...
  5. coderaiser commented on Feb 21, 2021

    @coderaiser
    Author

    Thank you @EndBug, I'll give it a try :).

  6. TonyLomastro commented on Feb 27, 2021

    @TonyLomastro

    Did you find a resolution to this? I'm getting an identical error with a completely different workflow

  7. Fadelis commented on Mar 4, 2021

    @Fadelis

    I also had a similar issue in this run. Not sure where's the problem..

  8. EndBug commented on Mar 4, 2021

    @EndBug
    Owner

    @Fadelis I honestly have no idea of why it's happening. Here's what I thought:

    • If the git URL was wrong, then it would have failed when the action pulled from the remote, so that can't be the case
    • The username could be the problem, but you're using the default option, and you're listed regularly as the GitHub actor in the run summary.
      Just one thing: you're hiding your private email on GitHub, right? Because I see that GitHub is censoring the username and email in the logs, and the only valid reason is that you're using GitHub's profile email. If that's the case then it's ok, otherwise, we'd need to look into it...

    I guess I'll open an issue in https://github.com/steveukx/git-js, since that's the package I'm using: they should at least be able figure out if the problem is in my implementation.

    Let me know about the email thing.

  9. Fadelis commented on Mar 4, 2021

    @Fadelis

    Well I don't have the Keep my email addresses private box ticked, but also I don't have a public display email selected, so maybe that could be the problem. Next time I'll try to update the flow to use the github-actions user instead of a personal one.

  10. EndBug commented on Mar 4, 2021

    @EndBug
    Owner

    @Fadelis Let me know if that changes anything 👍🏻

  11. xenoterracide commented on Mar 8, 2021

    @xenoterracide

    same issue, no matrix, here's the workflow file

    name: PlantUML
    on:
      push:
        paths:
          - '**.puml'
    jobs:
      plantuml:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v1
          - name: Get changed UML files
            id: getfile
            run: |
              echo "::set-output name=files::$(git diff-tree -r --no-commit-id --name-only ${{ github.sha }} | grep '.puml' | xargs)"
          - name: UML files considered echo output
            run: |
              echo ${{ steps.getfile.outputs.files }}
          - name: Generate SVG Diagrams
            uses: cloudbees/plantuml-github-action@master
            with:
              args: -v -tsvg ${{ steps.getfile.outputs.files }}
          - name: get remote branch name
            id: branch
            run: |
              BRANCH=$(echo $GITHUB_REF | cut --delimiter / --fields '3-')
              echo "::set-output name=name::$BRANCH"
          - uses: EndBug/add-and-commit@v7
            with:
              message: 'generate SVG for PlantUML'
              add: '*.svg'

    and the output

    Run EndBug/add-and-commit@v7
      with:
        message: generate SVG for PlantUML
        add: *.svg
        author_name: xenoterracide
        author_email: xenoterracide@users.noreply.github.com
        cwd: .
        pull_strategy: --no-rebase
        push: true
    Running in /home/runner/work/ppm-backend/ppm-backend
    Add input parsed as single string, running 1 git add command.
    > Using 'xenoterracide <xenoterracide@users.noreply.github.com>' as author.
    > Using "generate SVG for PlantUML" as commit message.
    Internal logs
      > Staging files...
      > Adding files...
      > No files to remove.
      > Checking for uncommitted changes in the git working tree...
      > Found 1 changed files.
      { raw: '', remote: null, branches: [], tags: [] }
      > Switching/creating branch...
      A	user.svg
      Branch 'db-module' set up to track remote branch 'db-module' from 'origin'.
      
      > Pulling from remote...
      { raw: '', remote: null, branches: [], tags: [] }
      PullSummary {
        remoteMessages: RemoteMessageSummary { all: [] },
        created: [],
        deleted: [],
        files: [],
        deletions: {},
        insertions: {},
        summary: { changes: 0, deletions: 0, insertions: 0 }
      }
      > Re-staging files...
      > Creating commit...
      {
        author: null,
        branch: 'db-module',
        commit: 'bea4de1',
        summary: { changes: 1, insertions: 41, deletions: 0 }
      }
      > No tag info provided.
      > Pushing commit to repo...
      Error: Error: Pushing to https://github.com/xenoterracide/ppm-backend
      fatal: could not read Username for 'https://github.com': No such device or address
      
    Outputs
      committed: true
      pushed: false
      tagged: false
    Error: Error: Pushing to https://github.com/xenoterracide/ppm-backend
    
  12. xenoterracide commented on Mar 8, 2021

    @xenoterracide

    fixed by using a different action to push

    name: PlantUML
    on:
      push:
        paths:
          - '**.puml'
    jobs:
      plantuml:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v1
          - name: Get changed UML files
            id: getfile
            run: |
              echo "::set-output name=files::$(git diff-tree -r --no-commit-id --name-only ${{ github.sha }} | grep '.puml' | xargs)"
          - name: UML files considered echo output
            run: |
              echo ${{ steps.getfile.outputs.files }}
          - name: Generate SVG Diagrams
            uses: cloudbees/plantuml-github-action@master
            with:
              args: -v -tsvg ${{ steps.getfile.outputs.files }}
          - uses: EndBug/add-and-commit@v7
            with:
              message: 'generate SVG for PlantUML'
              add: '*.svg'
              push: false
          - uses: ad-m/github-push-action@master
            with:
              github_token: ${{ secrets.GITHUB_TOKEN }}
              branch: ${{ github.ref }}
  13. EndBug commented on Mar 9, 2021

    @EndBug
    Owner

    @xenoterracide Well, of course you can use another action to push, you could also run git push directly.

    I've tried editing the potential fix, according to what the author of simple-git told me, could you try it? @Fadelis @xenoterracide
    It's EndBug/add-and-commit@fatal-fix-1

  14. xenoterracide commented on Mar 11, 2021

    @xenoterracide

    no, that didn't fix the problem, but moving to actions/checkout@v2 did (no patch needed). That was a pain though, it broke all of the git logic I had

  15. EndBug commented on Mar 11, 2021

    @EndBug
    Owner

    @xenoterracide Whoa, I didn't even consider that that could be the issue! Looking back, every workflow that has been posted in this issue was using actions/checkout@v1. I'll add a warning in the README

    Thanks a lot to everyone :)

  16. added
    type: not a bugReports that happen not be our fault
    and removed
    type: questionFurther information is requested
    on Mar 11, 2021
  17. added a commit that references this issue on Aug 18, 2026
    51d91f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: not a bugReports that happen not be our fault

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions