go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.08k stars 5.41k forks source link

Cannot clone local actions with self-signed cert #28693

Closed GammaGames closed 6 months ago

GammaGames commented 8 months ago

Description

My app.ini has the following:

[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = self

And my runner's config.yaml has:

runner:
  insecure: true

I have an action hosted on the server, but when I try to run the action with uses: Actions/test-action@main it fails with:

Extracting content to '/var/run/act/'
  ☁  git clone 'https://gitea-domain/Actions/test-action' # ref=main
  cloning https://gitea-domain/Actions/test-action to /root/.cache/act/Actions-test-action@main
Unable to clone https://gitea-domain/Actions/test-action refs/heads/main: Get "https://gitea-domain/Actions/test-action/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority
Get "https://gitea-domain/Actions/test-action/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker (both gitea and the runner)

Database

None

Zettat123 commented 6 months ago

It's a bug on the act_runner side. The insecure option should work when cloning a repository from the Gitea instance

Zettat123 commented 6 months ago

I've created a pull request to support cloning actions from the Gitea instance when the insecure option is true

lunny commented 6 months ago

Close as it's only act/act_runner related.