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.

error: src refspec gh-pages does not match any.

See original GitHub issue

Hiya,

I am running into the following error and I haven’t been able to determine why:

error: src refspec gh-pages does not match any.
error: failed to push some refs to 'https://MitchTalmadge:As provided by GitHub Actions@github.com/MitchTalmadge/CleanTweets.git'
##[error]Docker run failed with exit code 1

The odd part to me is the “As provided by GitHub Actions” found in the URL… I know for certain that the PAT secret I am using does contain a personal access token, not anything like that.

The full build logs are found here.

Here is my workflow:

name: Web Frontend

on: 
  push:
    branches: 
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1.1.0
    - name: Install
      run: npm --prefix web install
    - name: Build
      if: success()
      run: npm --prefix web run build
    - name: Deploy
      if: success()
      uses: crazy-max/ghaction-github-pages@v0.1.0
      env:
        GITHUB_PAT: ${{ secrets.GH_PAT }}
      with:
        build_dir: web/dist

The branch does exist in my repo: image

Thanks for any suggestions.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ChildishGiantcommented, Mar 13, 2021

Yeah, I realised the issue now. It’s not my project so I wanted to leave it as is but it’s ridiculous to generate it all in the root and publish that so I’m going to modify everything to be in a subfolder. Thanks for all the help 😄

1reaction
MitchTalmadgecommented, Nov 9, 2019

Sorry for the delay. The link is: https://github.com/MitchTalmadge/Portfolio/edit/master/.github/workflows/web-deployment.yml

However you probably won’t be able to edit this unless you fork my repo. Try it on your own workflow and it’ll probably work. When editing in the GitHub website, a marketplace search area appears on the right. Search for your action and you will see the version mismatch. I made a recording to illustrate this:

recording

I reported it to GitHub

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message 'src refspec master does not match any' when ...
The most probable reason for this error is that all the files are untracked and have not been added. git add --all in...
Read more >
Error: src refspec master does not match any – How to Fix in Git
This error can occur for different reasons. The most likely reason this error will occur is that the master branch does not exist....
Read more >
The Problem With 'src refspec does not match any' - Baeldung
Simply put, this error message tells us that we don't have a branch we want to push, which is the main reason for...
Read more >
Error when pushing to repository: Src refspec master does not ...
This is caused by the repository still being empty. There are no commits in the repository and thus no master branch to push...
Read more >
Git src refspec master does not match any Solution
The “src refspec master does not match any” error occurs if you have forgotten to add the files you have changed to a...
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