Hi, I am testing v2. My goal is to initialize submodules behind a private repo with the whole history.
I am not sure if I am doing this right, but I am doing this.
- uses: actions/checkout@v2
with:
token: ${{ secrets.CI_PAT }}
submodules: 'true'
fetch-depth: 0
And receiving this output.
Run actions/checkout@v2
/usr/bin/docker exec cf6073467e49ed136c89b40c65140167d4da6b133a966b11d7b7277f30c084cb sh -c "cat /etc/*release | grep ^ID"
Syncing repository: my_company/my_repo
Getting Git version info
Deleting the contents of '/__w/my_repo/my_repo'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +eebee8254a6b64f5edb7510c9a2fbdebe78873bb:refs/remotes/pull/156/merge
remote: Repository not found.
##[error]fatal: repository 'https://github.com/my_company/my_repo/' not found
The process '/usr/bin/git' failed with exit code 128
Waiting 20 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +eebee8254a6b64f5edb7510c9a2fbdebe78873bb:refs/remotes/pull/156/merge
remote: Repository not found.
##[error]fatal: repository 'https://github.com/my_company/my_repo/' not found
The process '/usr/bin/git' failed with exit code 128
Waiting 11 seconds before trying again
The repo and the company name was renamed here, but they are good
The browser opens the (right) URL.
Testing this on my computer, same output
➜ /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +20816e26ca5ed9fb1e1da7ea96b2ae70d18824ad:refs/remotes/pull/156/merge
Them removing this ...
+refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
With this command, I was able to execute it with success
➜ /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +20816e26ca5ed9fb1e1da7ea96b2ae70d18824ad:refs/remotes/pull/156/merge
So, does this is something I am doing wrong? If not, how to work around it while I can't see any fix?
Same issue here, https://github.com/actions/checkout/issues/254 but it was closed.
same issue here, tried the following from other similar issues:
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +2471ca0a3f4e0ae04bb566a9e0aba7bd9def5847:refs/remotes/pull/7/merge
##[error]fatal: could not read Username for 'https://github.com': terminal prompts disabled
The process '/usr/bin/git' failed with exit code 128
Waiting 11 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +2471ca0a3f4e0ae04bb566a9e0aba7bd9def5847:refs/remotes/pull/7/merge
##[error]fatal: could not read Username for 'https://github.com': terminal prompts disabled
The process '/usr/bin/git' failed with exit code 128
Waiting 12 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +2471ca0a3f4e0ae04bb566a9e0aba7bd9def5847:refs/remotes/pull/7/merge
##[error]fatal: could not read Username for 'https://github.com': terminal prompts disabled
##[error]The process '/usr/bin/git' failed with exit code 128
according to the docs for submodules flag:
# When the `ssh-key` input is not provided, SSH URLs beginning with
# `[email protected]:` are converted to HTTPS.
so i'm gonna attempt that next, however, adding an SSH key for this seems overkill
Someone told that V2 does not implement submodule but this info is not on README. So it will be nice to put it there if it is right.
Is works for me with:
steps:
- name: Git Checkout
uses: actions/checkout@v2
with:
submodules: true
Yeap, I tested this yesterday as well and it is working now. My issue is that my submodule is private.
But this is working as well now.
- name: Checkout with submodules
uses: actions/checkout@v2
with:
submodules: 'true'
token: ${{secrets.CI_PAT}}
Most helpful comment
Yeap, I tested this yesterday as well and it is working now. My issue is that my submodule is private.
But this is working as well now.