Clone repository using ssh #180
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: forgejo/runner#180
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have setup forgejo runner with default options as described in the documentation. I can run simple tests and things seem to work just fine.
But then when I try to clone a public repository using ssh, the job freezes and it looks like that the ssh connection does not establish at all. Are there any specific setting to allow ssh connection from the container to outside repositories?
Here is an example job:
My goal is to ultimately clone a private repository on a self-hosted forgejo instance.
It won't work without an ssh key. There are no specific settings.
To make this would you'd have to pass a key to the job via secret, store it and then clone the repository. You could wrap it in an action if you want but cloning with a key is out of scope for forgejo actions themselves.
The usual solution is actions/checkout
Thanks @thefox. I tried that approach but still no luck. I added a deploy key to the repo I like to connect to and added it as secrets to the repo I want to run actions in. Then used the following:
Looking at the runner's log, it is stock at cloning the repo for ever:
I'll try to do this when I'll have some time, it's interesting if anything.
You can also try running
git clone
withverbose
set. It might give you some insights.In general if you use actions/checkout@v4 you don't need to checkout via ssh.