-
-
Notifications
You must be signed in to change notification settings - Fork 282
Description
Describe the bug
When using the custom flavor generator (https://megalinter.io/latest/custom-flavors/) if the repository is cloned using SSH, the megalinter action fails as git@github.com: is pre-pended when pulling the image:
Pull down action image 'ghcr.io/git@github.com:{user/org}/{repo}/megalinter-custom-flavor:latest'
/usr/bin/docker pull ghcr.io/git@github.com:{user/org}/{repo}/megalinter-custom-flavor:latest
invalid reference format
Warning: Docker pull failed with exit code 1, back off 7.015 seconds before retry.
To Reproduce
Steps to reproduce the behavior:
- Follow the steps in the referenced page, but clone it with SSH and have the git remote origin be an ssh url:
$ git remote -v
origin git@github.com:<org>/<repo>.git
- Go through the rest of the process. The README.md with show the following:
- GitHub Action: On MegaLinter step in .github/workflows/mega-linter.yml, define `uses: git@github.com:{user/org}/{repo}@main`
- Even if omitting the
git@github.com:from theuses:line when setting up the action, the docker pull command will still use it and present the error/failure above in the github action.
Expected behavior
That even if using SSH keys to clone a repo, the custom flavor should still work and omit the git@github.com: from the docker pull and README.md file.
Additional context
I greatly appreciate the new option to build our own custom flavors! Thank you for this option!
It's just that our standard is to use SSH for git remotes. Once I reset the repo remote origin to use HTTPS and reran the npx mega-linter-runner --custom-flavor-setup command I was able to get it to work, but it should work for SSH remotes as well.