Comments (19)
@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.
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)
- Error: File was unable to be removed Error: EACCES: permission denied, rmdir '/opt/actions-runner/_work/...
- .gz is not a supported archive file format error on Windows with new version 9c1e94e0 HOT 12
- Github CI can't fetch submodule from git:// GNU savannah, unless it refers to upstream HEAD HOT 1
- import of .gitconfig on self-hosted runner causing git fetch failure
- :error::codeql/upload-sarif action failed: Input required and not supplied: token HOT 1
- how soon v3 will not be supported HOT 1
- t ref: master
- https://azam.plus/public/udids/member/login.php
- Run actions/checkout@v2 with: repository: tectonic/infrastructure-helm token: *** path: infrastructure-helm fetch-depth: 0 ssh-strict: true persist-credentials: true clean: true lfs: false submodules: false env: XDG_DATA_HOME: /root/.local/share KUBECONFIG: /root/kubeconfig AWS_DEFAULT_REGION: eu-central-1 AWS_REGION: eu-central-1 AWS_ACCESS_KEY_ID: *** AWS_SECRET_ACCESS_KEY: *** /usr/bin/docker exec
- fetch-depth question HOT 1
- Qiiqo
- title removed for spam
- Pwn3rzs.and.CyberArsenal
- k@alahmad
- 4413a
- 4413a
- 1
- `fetch-branches` option?
- checkout does not honour show-progress: false
- ERROR: when run action/checkout@v3 HOT 3
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.