Comments (20)
@maxperrimond try to generate a PAT and set that as repository secret, use that to clone the extra repository, the GITHUB_TOKEN is scope to the workflow repo.
Ex:
- name: Check out my other private repo
uses: actions/checkout@master
with:
repository: orgname/reponame
token: ${{ secrets.my_pat }}
from checkout.
Yes, you can
steps:
- uses: actions/checkout@master
with:
name: org1/repo1 <-- clone https://github.com/org1/repo1
ref: refs/heads/release
from checkout.
I tried to clone another private repository with the action but I only get:
##[error]fatal: repository 'https://github.com/orgname/reponame/' not found
step:
- name: Check out my other private repo
uses: actions/checkout@master
with:
repository: orgname/reponame
I tried to pass the github token but doesn't change the outcome.
from checkout.
@orelviz yes.
I use a path
parameter of actions/checkout
to specify cloning location.
https://github.com/ElegantNetworking/ElegantNetworkingRoot/blob/master/.github/workflows/gradle.yml#L21
Next I use a --project-dir
command line parameter of gradle to specify root location of gradle workspace
https://github.com/ElegantNetworking/ElegantNetworkingRoot/blob/master/.github/workflows/gradle.yml#L55
Link to this yml been posted above
from checkout.
If it's from another source outside of github do we use the full URL?
from checkout.
I want to clone multiple repos for together build. How to prevent deleting of prev-cloned repo?
It's my configuration: https://github.com/ElegantNetworking/ElegantNetworkingRoot/blob/master/.github/workflows/gradle.yml
Can anyone help?
from checkout.
Can we checkout or clone a gitlab repo?
from checkout.
This is for anyone coming here from a Google search.
If you receive the following error when trying to clone a public git repo with Github Actions (whether it's on Github or Gitlab or elsewhere):
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/git', 'fetch', 'origin', '--tags')
return code: 128
expected return code: 0
stdout: (none)
stderr:
fatal: unable to connect to github.com:
github.com[0: 140.82.113.4]: errno=Connection timed out
You need to configure git to clone using HTTPS, and not SSH:
git config --global url.https://github.com/.insteadOf git://github.com/
Example:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run shell commands
run: |
git config --global url.https://github.com/.insteadOf git://github.com/
git clone https://github.com/githubtraining/hellogitworld.git
from checkout.
Ok, now I solve cloning multiple repos by using path
.
But I have a problem with running gradle from inner directory
'cd' command is not work
from checkout.
@rogerprz did you get it to work with a repo outside of github.com?
I am also wondering if we can clone from another domain besides the one where this action is called. In my case, the domain is githubdev, and I want to clone from regular old github.com.
Currently, this action appends the githubdev domain to the repo
arg for the action (org/repo) leading to an incorrect full URL.
from checkout.
@hohserg1 can you elaborate on how you solved it? Can you share youre .yml
file?
from checkout.
Can we checkout or clone a gitlab repo?
+1 asking a same questions
from checkout.
It worked well. Thanks for your support @TingluoHuang
For me getting below issue: Any suggestions
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
from checkout.
I see multiple people asking whether custom git URL's can be checked out but don't think anyone posted a solution. Has anyone figured this out?
from checkout.
It worked well. Thanks for your support @TingluoHuang
from checkout.
Thanks
from checkout.
Yeeeeah! Solved! --project-dir
is cool!
from checkout.
@rogerprz did you get it to work with a repo outside of github.com?
from checkout.
@hohserg1 How did you manage to get the clone persistent?
from checkout.
Does anyone have a simple example of using both path and clean: false, when trying to checkout another repo at the same level as the currently building repo?
I'm trying to get this..
/currentdev/currentrepo
/currentdev/../siblingrepo
before then building the project in currentrepo
.
from checkout.
Related Issues (20)
- Unable to clone my other private repo's which i own from my private repository in github actions workflow
- Lack of support for GITHUB_SERVER_URL with subpath
- Infinite loop when git push
- PAT based access to different account not working in github actions
- inadequate documentation on "filter" option
- Error relocating /__e/node20_alpine/bin/node: secure_getenv: symbol not found HOT 1
- Заблокировать перевод по номеру телефона. Сбербанк
- 'actions/checkout@v4' with LFS fails because of double auth header HOT 1
- New
- 2 segunda
- Support LFS include/exclude HOT 1
- checkout fails when called from reusable workflows HOT 2
- https://github.com/actions/checkout/issues/new
- actions/checkout fails on git repos that use SHA256 HOT 1
- Exit code 128 (repository not found) eventhough the repo exists. HOT 1
- V4 hangs from time to time on fetching repository on GitHub ARC
- Not always working on private repos HOT 1
- Validador
- Checkout v4 Fails On Windows Server 2019 HOT 2
- Feature Request: Retry on network errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkout.