github-actions
github-actions copied to clipboard
could not read Username for 'https://github.com' whn using auto-commit action
Hi. I'm facing error: fatal: could not read Username for 'https://github.com': No such device or address
Here is my config:
name: .NET Core CI
on: [push]
jobs:
build:
name: Generate epg
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Filter release branch
uses: actions/bin/filter@master
with:
args: branch release
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.108
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Run with dotnet
run: dotnet run
- name: Auto-commit
uses: docker://cdssnc/auto-commit-github-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_EPG_BOT_TOKEN }}
with:
args: This is an auto-commit
Hi Acidfabric,
Sorry I only saw the issue today - I turned off my email notification on github :grimacing:.
I just merged https://github.com/cds-snc/github-actions/pull/25, maybe that will fix it.
Best Max
Hi, I tried to use the action and it didn't worked. I get the same error message as @Acidfabric and my workflow configuration is also similar.

Did you find a solution for this?
TL;DR use actions/checkout@v2
Using version 2 of the checkout action solves this issue. While I haven't reviewed the actual code, I would be pretty certain that the following passage from the release notes (https://github.com/actions/checkout/releases) is the important bit:
Script authenticated git commands Persists the input token in the local git config
Updated
After using it more in my project I've noticed that by default with the v2 checkout it will work just fine for push triggered jobs. If your job is defined on a pull_request trigger, you will need to add a parameter to the checkout action. Otherwise, you'll encounter the following error
error: unable to push to unqualified destination: HEAD
You will need to instruct the checkout action to checkout the branch referenced by the pull request, not the pull request itself (which it will do by default). Using the github.base_ref value:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}