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.

Retrieving the default branch name failed

See original GitHub issue

An action fails during the checkout action with the following error:

Determining the default branch
Retrieving the default branch name
Not Found
Waiting 12 seconds before trying again
Retrieving the default branch name
Not Found
Waiting 13 seconds before trying again
Retrieving the default branch name
##[error]Not Found

The checkout action in a workflow is configured as follows:

      steps:
      # checkout podspec repository
      - uses: actions/checkout@v2
        with:
          repository: Bluedot-Innovation/PointSDK-iOS.git
          token: ${{ secrets.REPO_ACCESS_TOKEN }}

However, the same repository with the same configuration has passed an action 21 Apr 2020.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

6reactions
billputercommented, Sep 29, 2020

I had the same error message, and my issue was that the token holder didn’t have read access to the repository I was attempting to access. I was able to fix by granting that user read access. You’re trying to access a public repository, so it’s not the same issue.

It looks like you just need to remove the .git from the end of your repository name. It should read repository: Bluedot-Innovation/PointSDK-iOS.

4reactions
davewicherscommented, Sep 21, 2021

I have the same problem as @dhamo-pk. Seems like you should be able retrieve a specific branch (main in this example), by either doing this:

repository: Orgn1-Global/voy-frontend@main

or

repository: Orgn1-Global/voy-frontend branch: main

But neither works/seems to be supported. When I go to MY project and look at it in github it says under Settings / Branches / Default branch - main. (Is the default branch).

So seems to me like I shouldn’t have to try to specify the branch as ‘main’ since that is already the default. If it is a permissions issue, then it would be much better if ‘Retrieving the default branch name’ said there was a Permissions error, rather than just ‘Not Found’. HOW/WHY is the default branch name ‘not found’. Can this actions/checkout@v2 action script be improved to explain WHY?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github Action: Default branch not found on privat repository
I tried using ${{ secrets.REPO_ACCESS_TOKEN }} and env: GITHUB_TOKEN without success. Determining the default branch Retrieving ...
Read more >
Github Actions Error: Could not find a default branch to fall ...
I have 4 branches dev, qa, staging and master. Staging is currently used for the live site. Qa is the branch that has...
Read more >
7 Github Actions Tricks I Wish I Knew Before I Started
For Branch name pattern insert main and create the rule. And if you go back to the pull request page, you'll see that...
Read more >
Default branch - GitLab Docs
Update the default branch name in your repository · Verify that nothing is pointing to it. · Delete the branch on the remote:...
Read more >
Mirror does not update when initial default branch is an ... - Jira
Before the first push to a newly created repository, rename the local default branch from "master" to an arbitrary name i.e "test". When...
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