Open olvresc opened 1 year ago
At first sight, configuration looks ok.
Could you try git clone git@github.com:olvresc/aaa.git
as the URL please?
At first sight, configuration looks ok.
Could you try
git clone git@github.com:olvresc/aaa.git
as the URL please?
Hi, was able to clone the repository (on my machine)
$ git clone git@github.com:olvresc/aaa.git
Cloning into 'aaa'...
remote: Enumerating objects: 351, done.
remote: Counting objects: 100% (351/351), done.
remote: Compressing objects: 100% (254/254), done.
remote: Total 351 (delta 171), reused 268 (delta 88), pack-reused 0 eceiving objects: 59% (208/351)
Receiving objects: 100% (351/351), 91.40 KiB | 207.00 KiB/s, done.
Resolving deltas: 100% (171/171), done.
I have the same issue.
I am using this action to use a deploy key to pull a private submodule.
When I use this action:
- uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY}}
- uses: actions/checkout@v3
with:
submodules: true
I get the following output from my checkout step:
Fetching submodules
/usr/bin/git submodule sync
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1
Submodule 'bar' (git@github.com:foo/bar.git) registered for path 'src/bar'
Cloning into '/opt/actions-runner/_work/baz/baz/src/bar'...
remote: Repository not found.
Error: fatal: repository 'https://github.com/foo/bar.git/' not found
Error: fatal: clone of 'git@github.com:foo/bar.git' into submodule path '/opt/actions-runner/_work/baz/baz/src/bar' failed
Failed to clone 'src/baz'. Retry scheduled
Cloning into '/opt/actions-runner/_work/baz/baz/src/bar'...
remote: Repository not found.
Error: fatal: repository 'https://github.com/foo/bar.git/' not found
Error: fatal: clone of 'git@github.com:foo/bar.git' into submodule path '/opt/actions-runner/_work/baz/baz/src/bar' failed
Failed to clone 'src/bar' a second time, aborting
Error: The process '/usr/bin/git' failed with exit code 1
However when I use a fork of this project that has been extended to add repo-mappings
, it works without any further alterations:
- uses: shaunco/ssh-agent@git-repo-mapping
with:
ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY }}
repo-mappings: github.com/foo/bar
- uses: actions/checkout@v3
with:
submodules: true
This makes me believe that there is nothing wrong with my SSH deploy key and instead there is a bug in this project.
I read the main README and it sounds like I should not experience any issues as this is the only SSH private key I install, and I only pull one submodule.
Nevermind, I spoke to soon. After merging and the CI running a few more times the issue still happens, it just appears to not happen all the time.
~This problem no longer happens for me with the latest ssh-agent.~
~The only thing that has changed is that I'm now using actions/checkout@v4
instead of v3:~
- uses: actions/checkout@v4
with:
submodules: true
~My config now looks like:~
- uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY }}
repo-mappings: github.com/foo/bar
- uses: actions/checkout@v4
with:
submodules: true
Hello, encountering an error when using
webfactory/ssh-agent@v0.7.0
Worflow
Error:
Added my private key as
SSH_PRIVATE_KEY
and public key as deploy key with commentgit@github.com:olvresc/aaa.git