Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checking out fails on public repo but works on private... #280

Closed
jeffmcaffer opened this issue Jun 16, 2020 · 2 comments
Closed

checking out fails on public repo but works on private... #280

jeffmcaffer opened this issue Jun 16, 2020 · 2 comments

Comments

@jeffmcaffer
Copy link

Using the workflow below fails if the cited repo (repository: foo/works-if-private) is public but works if it is private. I understand that a token is not "necessary" if the repo is public but in the general case we don't know if the repo is public or private and it may change over time.

name: "foo"
on: 
  pull_request:
    branches:
      - master

jobs:
  work:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: get repo
      uses: actions/checkout@v2
      with: 
        repository: foo/works-if-private
        ref: master
        token: ${{ secrets.PAT }}
        path: dest
        persist-credentials: false

Here is what appears to be the relevant part of the log (from Fetching the repository)

  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 18 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 15 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
@ericsciple
Copy link
Contributor

Can you try setting the following env vars so fetch will print more info:

GITHUB_TRACE=1
GIT_CURL_VERBOSE=1

For example:

jobs:
  foo:
    steps:
      - uses: actions/checkout@v2
        env:
          GIT_TRACE: 1
          GIT_CURL_VERBOSE: 1

modosc added a commit to ilyalesik/express-robots-txt that referenced this issue Aug 10, 2020
@cory-miller
Copy link
Contributor

Closing as stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants