Public Repo Deployment from Private Repo
bug
### Description
Not sure if I'm doing something wrong here:
I have a private repo with all service definition which works great,
However when I add a public repo I get an error
Is doco trying to use my private key on the public repo?
### Steps to reproduce the issue
```bash
See above
```
### Operating System
Linux
### Docker Compose File
```yaml
x-poll-config: &poll-config
POLL_CONFIG: |
- url: https://codefloe.com/private/repo.git
reference: main
target: ahri
interval: 600
services:
doco-cd:
container_name: doco-cd
image: ghcr.io/kimdre/doco-cd:latest
restart: unless-stopped
environment:
TZ: America/Toronto
GIT_ACCESS_TOKEN: PRIVATE_REPO_ACCESS_TOKEN
<<: *poll-config
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/j/data:/data
cap_drop:
- ALL
healthcheck:
test: [ "CMD", "/doco-cd", "healthcheck" ]
start_period: 15s
interval: 30s
timeout: 5s
retries: 3
```
### Deployment Config
There are more services than these but just put in these two for reference
```yaml
name: ahri-matrix
working_dir: ahri-matrix
compose_files:
- matrix.ahri.compose.yml
---
name: ai
repository_url: https://github.com/maemreyo/omnivoice-server
reference: main
working_dir: ai
compose_files:
- ai.compose.yml
```
### Logs
```sh
doco-cd | {"time":"2026-05-02T15:31:42.693241342-04:00","level":"info","msg":"starting application","log_level":"info","version":"v0.83.0"}
doco-cd | {"time":"2026-05-02T15:31:42.718311391-04:00","level":"info","msg":"api endpoints disabled, no api secret configured"}
doco-cd | {"time":"2026-05-02T15:31:42.718338438-04:00","level":"info","msg":"webhook endpoints disabled, no webhook secret configured"}
doco-cd | {"time":"2026-05-02T15:31:42.718349415-04:00","level":"info","msg":"listening for events","enabled_endpoints":["/v1/health"],"http_port":80}
doco-cd | {"time":"2026-05-02T15:31:42.718425895-04:00","level":"info","msg":"poll configuration found, scheduling polling jobs","poll_config":[{"deployments":[],"interval":600,"reference":"main","run_once":false,"target":"ahri","url":"https://codefloe.com/private/repo.git"}]}
doco-cd | {"time":"2026-05-02T15:31:42.718525647-04:00","level":"info","msg":"polling repository","custom_target":"ahri","job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","repository":"codefloe.com/private/repo","trigger":{"config":{"deployments":[],"interval":600,"reference":"main","run_once":false,"target":"ahri","url":"https://codefloe.com/private/repo.git"},"event":"poll"}}
doco-cd | {"time":"2026-05-02T15:31:42.718600173-04:00","level":"info","msg":"serving prometheus metrics","http_port":9120,"path":"/metrics"}
doco-cd | {"time":"2026-05-02T15:31:43.734240196-04:00","level":"error","msg":"deployment failed","custom_target":"ahri","deploy":{"error":"failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","reference":"main","stack":"ai"},"job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:31:43.978320189-04:00","level":"error","msg":"error during poll job","custom_target":"ahri","error":"deployment failed, err: failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:31:43.978357012-04:00","level":"warning","msg":"job completed with errors","custom_target":"ahri","elapsed_time":"1.259s","error":"deployment failed, err: failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","next_run":"2026-05-02T15:41:43-04:00","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:32:44.117110237-04:00","level":"error","msg":"deployment failed","custom_target":"ahri","deploy":{"error":"failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","reference":"main","stack":"ai"},"interval":60,"job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","reconciliation_id":"019dea2d-cf4b-774b-88d5-92c22c142c1c","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:32:44.344437429-04:00","level":"error","msg":"failed to deploy","custom_target":"ahri","error":"failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","interval":60,"job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","reconciliation_id":"019dea2d-cf4b-774b-88d5-92c22c142c1c","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:33:44.500084624-04:00","level":"error","msg":"deployment failed","custom_target":"ahri","deploy":{"error":"failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","reference":"main","stack":"ai"},"interval":60,"job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","reconciliation_id":"019dea2e-bb19-7813-8fd9-f7c7c9eb9bba","repository":"codefloe.com/private/repo"}
doco-cd | {"time":"2026-05-02T15:33:44.689833186-04:00","level":"error","msg":"failed to deploy","custom_target":"ahri","error":"failed to clone repository: clone failed: All attempts fail:\n#1: authentication required: Invalid username or token. Password authentication is not supported for Git operations.","interval":60,"job_id":"019dea2c-dffe-77c1-89d1-996e2d949ffa","reconciliation_id":"019dea2e-bb19-7813-8fd9-f7c7c9eb9bba","repository":"codefloe.com/private/repo"}
```
1 条评论