-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private repository submodule sync failed. #14
Comments
@socar-baegoon did you configure your submodule via |
Tried that and it didn't work.
|
This issue occurs not because of ssh, but because of private repository. |
(In my case it's a different owner—org vs personal—but still can't make it work. All are private repos.) |
This is happening to me too. I've tried setting the |
@maxilevi have your try set |
@TingluoHuang Yes, I've created a new PAT with full repo access and added it as a secret to the repository. Then I called the action this way: - uses: actions/checkout@v1
with:
token: ${{ secrets.HEDRA_CI }}
submodules: true And it fails with the following error (same as the other guys):
|
@maxilevi your submodules are configured via |
@TingluoHuang Thank you, it works now. Any plans on supporting ssh? |
Thank you! It works! jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: develop
token: ${{ secrets.BAEGOON_TOKEN }}
submodules: true
|
I will close this issue. |
I ran into this same issue and made a slightly different tweak. As part of my workflow I use As my first step in my YAML file, before running - name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig @TingluoHuang I feel like this issue should be reopened if it's not the desired behavior, and if it is I think it needs to be better documented. I can open another issue if that is desirable. |
@joeshaw i am in the process of documenting all these problems. |
Please refer to this link. and please use this link to create a token. |
@socar-baegoon Thank you. I got it working following your instructions. |
This should be added into the manual page. |
If this helps anyone, this is working for me:
# disable the keychain credential helper
git config --global credential.helper ""
# enable the local store credential helper
git config --global --add credential.helper store
# add credential
echo "https://x-access-token:${{ secrets.A_TOKEN }}@github.com" >> ~/.git-credentials
# tell git to use https instead of ssh whenever it encounters it
git config --global url."https://github.com/".insteadof git@github.com:
# do something
git clone git@github.com:user/repo.git |
Big thanks to @rcoup for sharing the solution. I used it directly in the yml. Had to be careful because of the colon:
|
Use HTTPS url for ADL So that github action can pull it actions/checkout#14
Use HTTPS url for ADL So that github action can pull it actions/checkout#14
@joeshaw I'm having no luck with your approach. I made a personal access token with the scope This is what I have in my yaml file: name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig
# I verified that the output looks fine
- run: cat ~/.gitconfig
- uses: actions/checkout@v1
with:
submodules: 'recursive'
token: ${{ secrets.ACCESS_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm i
npm test
env:
CI: true which results in the same errors as others above:
Did I do something obviously wrong? EDIT: I gave up, and converted all my git submodule URLs to |
@trusktr look carefully at your error message. It’s failing to pull from bitbucket, not github. You’ll need a similar |
Use HTTPS url for ADL So that github action can pull it actions/checkout#14
Not working for me |
This solution was a year ago. Good luck 👍 |
@h1manshug using jobs:
tests:
steps:
- uses: actions/checkout@master
with:
ssh-key: ${{ secrets.CI_SSH_PRIVATE_KEY }}
submodules: true You might want to create a machine user to hold the ssh key for you. |
this way the workflow can switch between https and ssh
|
it works for me as a solution 2023:
|
@lencshu's solution worked for me. Created the access token on my personal repo, made sure to give it full read/write persmissions. |
Please fix it. 🙏
The text was updated successfully, but these errors were encountered: