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

v2 submodule - ##[error]fatal: Could not read from remote repository #341

Open
nodesocket opened this issue Aug 31, 2020 · 2 comments
Open

Comments

@nodesocket
Copy link

nodesocket commented Aug 31, 2020

I am trying to pull in submodules from a branch using the config:

    - uses: actions/checkout@v2
      with:
        ref: rocks
        ssh-key: ${{ secrets.CHECKOUT_SUBMODULE_KEY }} 
        submodules: recursive 

However, in Fetching the repository it is breaking with ##[error]fatal: Could not read from remote repository.. We generated an SSH key, added the public key as a deploy key into the child GitHub repo, and then added the SSH private key into GitHub secrets as CHECKOUT_SUBMODULE_KEY in the base repo.

Any idea what we are doing wrong?

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/rocks*:refs/remotes/origin/rocks* +refs/tags/rocks*:refs/tags/rocks*
  ERROR: Repository not found.
  ##[error]fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  The process '/usr/bin/git' failed with exit code 128
  Waiting 13 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/rocks*:refs/remotes/origin/rocks* +refs/tags/rocks*:refs/tags/rocks*
  ERROR: Repository not found.
  ##[error]fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  The process '/usr/bin/git' failed with exit code 128
  Waiting 16 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/rocks*:refs/remotes/origin/rocks* +refs/tags/rocks*:refs/tags/rocks*
@nemani
Copy link

nemani commented Oct 21, 2020

I have the same issue. Right now it seems it doesnt work as it should. Going with adding a separate checkout step where I will init it manually. (like mentioned here: #287 (comment))

(I also checked by forcing it to use the latest v2.3.3)

@thboop Please update the readme if the above way is not supported which seems to be the case :)

@a2br
Copy link

a2br commented Oct 13, 2021

To anyone who's reading this: if you use GitHub personal access tokens, use the token property, not ssh-key

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