Hello,
I have a Gitea Repository that is set to private. Now I want to run gitea workflow so I can deploy an app but each time I want to run the workflow I get a fatal: unable to access 'https://[url]/[user]/[repository]/': The requested URL returned error: 403
Here is my Gitea Workflow yml
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
This is the log for checkout
::add-matcher::/run/act/actions/actions-checkout@v4/dist/problem-matcher.json
Syncing repository: [user]/[repository]
::group::Getting Git version info
Working directory is '/workspace/[user]/[repository]'
[command]/usr/bin/git version
git version 2.43.2
::endgroup::
Deleting the contents of '/workspace/[user]/[repository]'
::group::Initializing the repository
[command]/usr/bin/git init /workspace/[user]/[repository]
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /workspace/[user]/[repository]/.git/
[command]/usr/bin/git remote add origin https://[url]/[user]/[repository]
::endgroup::
::group::Disabling automatic garbage collection
[command]/usr/bin/git config --local gc.auto 0
::endgroup::
::group::Setting up auth
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/gitea\.***\.com\/\.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/gitea\.***\.com\/\.extraheader' && git config --local --unset-all 'http.https://[url]/.extraheader' || :"
[command]/usr/bin/git config --local http.https://[url]/.extraheader AUTHORIZATION: basic ***
::endgroup::
::group::Fetching the repository
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +a9eee5316026e471259bf372f5f50e1d79f3711b:refs/remotes/origin/main
remote: Interacting with repositories by HTTP protocol is not allowed
fatal: unable to access 'https://[url]/[user]/[repository]/': The requested URL returned error: 403
The process '/usr/bin/git' failed with exit code 128
Waiting 13 seconds before trying again
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +a9eee5316026e471259bf372f5f50e1d79f3711b:refs/remotes/origin/main
remote: Interacting with repositories by HTTP protocol is not allowed
fatal: unable to access 'https://[url]/[user]/[repository]/': The requested URL returned error: 403
The process '/usr/bin/git' failed with exit code 128
Waiting 18 seconds before trying again
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +a9eee5316026e471259bf372f5f50e1d79f3711b:refs/remotes/origin/main
remote: Interacting with repositories by HTTP protocol is not allowed
fatal: unable to access 'https://[url]/[user]/[repository]/': The requested URL returned error: 403
::remove-matcher owner=checkout-git::
::error::The process '/usr/bin/git' failed with exit code 128
What do I have to do, so that workflow can checkout the gitea repository? Do I have to add an ssh-key into the secret?