EndBug / add-and-commit

:octocat: Automatically commit changes made in your workflow run directly to your repo
MIT License
1.13k stars 117 forks source link

Action Failure: 'Could not read from remote repository' #651

Closed silas-wr closed 1 month ago

silas-wr commented 2 months ago

Describe the bug The action is failing with the message: Could not read from remote repository

Workflow used

jobs:
  build_c:
    name: build c++ project
    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
    - uses: actions/checkout@v4
    - name: Build Our Project
      run: |
        bash compile.sh

    - name: Commit Project
      uses: EndBug/add-and-commit@v9.1.4
      with:
        author_name: Silas Wrinker
        author_email: alcosojr79@gmail.com
        message: Built project
        pull: true
        push: true

Expected behavior I expected it to commit just fine to my repository (silas-wr/crate), just like it had done for the past ninety-something runs. It had only failed once or twice, but then it would stop. Now it won't stop failing for the same reason. I can't find any way to solve the problem.

Logs This is the output it gave me when I ran the action.

Logs
Run EndBug/add-and-commit@v9.1.4
Running in /home/runner/work/crate/crate
Add input parsed as single string, running 1 git add command.
> Using 'Silas Wrinker ' as author.
> Using "Built project" 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.
  > Fetching repo...
  {
    raw: '',
    remote: null,
    branches: [],
    tags: [],
    updated: [],
    deleted: []
  }
  > Pulling from remote...
  {
    raw: '',
    remote: null,
    branches: [],
    tags: [],
    updated: [],
    deleted: []
  }
  Error: Error: Could not read from remote repository.
Outputs
  committed: false
  commit_long_sha: undefined
  commit_sha: undefined
  pushed: false
  tagged: false
  tag_pushed: false
Error: Error: Could not read from remote repository.
silas-wr commented 2 months ago

By the way, I checked the settings and the workflows do have read settings on.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.