As per issue https://github.com/actions/checkout/issues/14, the standard way to make private submodules work with checkout is to use insteadOf to rewrite git@ urls to https:// and to use a private access token, e.g.:
- name: Fix submodules
run: echo -e '[url "https://github.com/"]\n insteadOf = "[email protected]:"' >> ~/.gitconfig
- name: Checkout server
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
token: ${{ secrets.CUREATR_PAT }}
As of a few days ago, checkout@v1 now seems to overwrite ~/.gitconfig and this no longer works.
It appears this PR made the change https://github.com/actions/checkout/pull/56
How should we make private submodules work with the non-backward compatible checkout@v1?
Also where is the source code to the checkout plugin, it would be useful for debugging breaking changes like this.
All my builds are broken because of private submodules.
I used to do the git -> https replacements, but now I use relative submodule urls (../), and it was working fine until today. I see the error below:
##[error]fatal: could not read Username for 'https://github.com': terminal prompts disabled
Using previous commit hash will work in the interim.
- name: Checkout
uses: actions/checkout@f6ce2afa7079cb075a124c93c79d61779d845782
@rectalogic, @tuler ,
Thanks for the report this bug has been addressed. uses: checkout/actions@v1 has been fixed to work as it did previously. Please try updating your workflows to the v1 tag and let me know if you see any more issues.
Also where is the source code to the checkout plugin, it would be useful for debugging breaking changes like this.
We are working on this as well!
It's working!
Thanks for reporting this, @rectalogic and @tuler. And thanks for the prompt fix, @thboop!
Most helpful comment
All my builds are broken because of private submodules.
I used to do the git -> https replacements, but now I use relative submodule urls (
../), and it was working fine until today. I see the error below: