Search code examples
gitcontinuous-integrationdrone.iogogs

Why is Drone failing to read my username?


I'm setting up a self-hosted Drone CI server that integrates with a self-hosted Gogs server.

I've set up a test repository with the following structure:

test/
 |
 *- add.go
 *- add_test.go
 *- .drone.yml

The contents of my .drone.yml file is as follows:

image: mischief/docker-golang
env:
    - GOPATH=/var/cache/drone
script:
    - go build
    - go test -v

Drone was started with the following environment variables (passed with the -e flag of docker run since both Drone and Gogs are running containerized).

"DRONE_GOGS_SKIP_VERIFY=true"
"DRONE_GOGS_URL=http://gogs.sentimens.duckdns.org"
"DRONE_GOGS_SECRET=[redacted]"
"DRONE_GOGS_OPEN=true"

When pushing to the new repository, the build is triggered, but fails with the following output:

$ git clone --depth=50 --recursive --branch=master http://gogs.sentimens.duckdns.org/drone/test.git /var/cache/drone/src/gogs.sentimens.duckdns.org/drone/test
Cloning into '/var/cache/drone/src/gogs.sentimens.duckdns.org/drone/test'...
fatal: could not read Username for 'http://gogs.sentimens.duckdns.org': No such device or address

What is going on here? Do I need to specify credentials in the yaml file?


Solution

  • The repository must be public: https://github.com/drone/drone/issues/860