Checkout with private submodules doesn't work #26936
-
Hello. I can’t get to work private submodule checkout. I’ve created two private repositories: first_repo and second_repo. Then I’ve added second_repo as a submodule to first_repo. When I am trying to make checkout it gives me the following:
My yml file:
I have already tried almost every solution I’ve found. But nothing seems to be working. Does anyone know the soluttion ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi @shabalinanton , I can repro the same on my side: Please re-create the personal access token and update the value of secrets, confirmed it works: Actually you can directly checkout both repo with below code:
Or you can clone the private repo via command:
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hello, @weide-zhou Thanks for the answer! But I still have a problem. When I am trying to do:
Then I get the following error:
But everything work when I change ${{secrets.MY_PAT}} to the key value, for example:
I believe something could be wrong with a syntax. Also this error appears when I am trying to use repository secret. This is my yml file:
Which gives me the following result:
|
Beta Was this translation helpful? Give feedback.
-
Hi @shabalinanton , Based on your error message, ${{secrets.MY_PAT}} doesn’t have the value of your token. Please update the secrets MY_PAT with the new value, or re-create a new PAT token from github setting https://github.com/settings/tokens, and then update the secrets with the new PAT. Please make sure the secrets exist on the repo which contains the workflow yaml. Regarding the submodule parameter, you don’t need to checkout twice, only one action is enough, it will automatically checkout the submodule repo. Please check the usage link for more details.
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hello again, @weide-zhou Please, watch the following. I’ve created a video with steps to reproduce my problem: I can’t get why it don’t work on my side. Maybe you can help me. |
Beta Was this translation helpful? Give feedback.
-
Hi @shabalinanton , You didn’t store the PAT as the secret value of repo_one. Until the last minute of your video, you create the secrets, but with incorrect value… Please update secert MY_SECRET with your PAT token. And in workflow yaml of repo_one:
Please refer to official doc for more details. Thanks |
Beta Was this translation helpful? Give feedback.
Hi @shabalinanton ,
You didn’t store the PAT as the secret value of repo_one. Until the last minute of your video, you create the secrets, but with incorrect value…
Please update secert MY_SECRET with your PAT token.
And in workflow yaml of repo_one:
Please refer to official doc for more details.
Thanks