Closed cubesky closed 2 years ago
version: '3'
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- 192.168.192.2:11491:8000
volumes:
- ./data:/var/lib/drone/
environment:
- WOODPECKER_OPEN=true
- WOODPECKER_HOST=https://ci.example.com
- WOODPECKER_AGENT_SECRET=example_secret
- WOODPECKER_GITEA=true
- WOODPECKER_GITEA_URL=https://git.example.com
- WOODPECKER_GITEA_CLIENT=example_gitea_client
- WOODPECKER_GITEA_SECRET=example_gitea_secret
- WOODPECKER_GIT_ALWAYS_AUTH=true
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
command: agent
restart: always
depends_on:
- woodpecker-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WOODPECKER_SERVER=woodpecker-server:9000
- WOODPECKER_AGENT_SECRET=example_secret
version: "3.6"
services:
drone:
image: drone/drone:2
ports:
- 192.168.192.2:11380:80
environment:
DRONE_GITEA_SERVER: "https://git.example.com"
DRONE_GITEA_CLIENT_ID: "example_gitea_clientid"
DRONE_GITEA_CLIENT_SECRET: "example_gitea_secret"
DRONE_RPC_SECRET: "example_secret"
DRONE_SERVER_HOST: "ci.example.com"
DRONE_SERVER_PROTO: "https"
DRONE_USER_CREATE: "username:foo,admin:true,token:bar"
DRONE_GIT_ALWAYS_AUTH: "true"
volumes:
# attach a directory relative to the directory containing this compose file
- ./data:/data
restart: always
version: "3.6"
services:
drone:
image: drone/drone-runner-docker:1
ports:
- 192.168.192.2:18182:18182
environment:
DRONE_HTTP_BIND: "18182"
DRONE_RUNNER_CAPACITY: "1"
DRONE_RUNNER_NAME: "Example-Docker"
DRONE_RPC_SECRET: "example_secret"
DRONE_RPC_HOST: "ci.example.com"
DRONE_RPC_PROTO: "https"
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
@cubesky is the repo you like to fetch from private?
@cubesky is the repo you like to fetch from private?
Yes, it is internal repo.
Ok you got hit by: https://github.com/woodpecker-ci/plugin-git/issues/4
TLD: my bad - it is a known issue that still need a fix
The drone "fix" is just a workaround you could "do" via secrets, but i would not recommend to use your own account
So i propose: create an "clone" account with read permissions only and add credentials (user+token) to secrets & pass it to the git plugin
If you have matrix/discord we can chat how to do there too :)
I think use user's permission to clone repo is better than using a "clone" user. I have discord account. My matrix server is broken. (Sad)
-> #479
Component
server, agent, other
Describe the bug
Git fetch always fatal using Gitea OAuth.
This happens on DroneCI too, but add
DRONE_GIT_ALWAYS_AUTH=true
can solve this problem. It there any similar solution for woodpecker?WOODPECKER_GIT_ALWAYS_AUTH
doesn't work.System Info
Additional context
Woodpecker and Gitea is on the same host with docker.
Validations