question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I'm getting "error: failed to push some refs to repo"

See original GitHub issue

I want to add some files wheneever I push to a branch, I worked fine the first time but after that I’m getting this error. I’ve tried adding differents pull_strategy but none of them work. This is my action script

`name: Generate files

on: push: branches: feature/test_branch

jobs:

generate_files:

name: Generate files

runs-on: ubuntu-latest
steps:
    - uses: actions/checkout@v2.1.1

    - name: Set up JDK 1.8
      uses: actions/setup-java@v1.4.3
      with:
        java-version: 1.8

    - name: Generate files
      run: ./gradlew -b generate_files.gradle


    - name: Commit files
      uses: EndBug/add-and-commit@v7
      with:
        default_author: github_actions
        add: .github/workflows`

Error: Error: Pushing to https://github.com/Yuvod/yuvod-app-android-tv POST git-receive-pack (1446 bytes) error: failed to push some refs to 'https://github.com/Yuvod/yuvod-app-android-tv'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
loomchildcommented, Sep 8, 2021

@EndBug You are totally right.

I tried to reproduce the error, but without luck. I think that there might be something wrong with the repo, since even merging changes from upstream didn’t work at some point.

I will raise a new bug once it happens again, so I can provide more information.

Thanks for your help!

1reaction
aloj22commented, Jun 18, 2021

It was due to missing workflow permission in token. It was fixed by using a PAT with this permission. It can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix 'failed to push some refs to' Git Errors - Komodor
failed to push some refs to errors are often caused when changes are not committed before pushing, issues with Git pre-push hook, incorrect...
Read more >
git error: failed to push some refs to remote - Stack Overflow
If the GitHub repo has seen new commits pushed to it, while you were working locally, I would advise using: git pull --rebase...
Read more >
Failed to Push Some Refs | Git Error - Assembla Help Center
This means that someone else pushed a commit to the same branch you're pushing to, but you don't have that commit on your...
Read more >
error: failed to push some refs to - YouTube
Transcript · Git Error | GitHub Error : failed to push some refs to '[REPO URL]' · Intl.RelativeTimeFormat Is A Game Changer In...
Read more >
Git Error | GitHub Error: failed to push some refs to '[REPO URL]'
Are you starting to use Git/GitHub and just came across the message " failed to push some refs to ..."? Don't worry, this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found