Hello,
I’ve read this topic, Cannot clone private gitea repo (could not read Username for…) 0.8.0-rc.3, gitea 1.2.0-rc2. And I’m still facing the issue at the clone step:
fatal: could not read Username for 'https://bitbucket.org': No such device or address
exit status 128
I wanted to debug it but I don’t understand how I can debug the plugins/git with the Bitbucket credentials.
I tried with my own personal credentials and it worked:
$ docker run --rm \
-e DRONE_REMOTE_URL='https://me:password@bitbucket.org/ORG/PROJECT.git' \
-e DRONE_WORKSPACE=/go/src/bitbucket.org/ORG/PROJECT \
-e DRONE_BUILD_EVENT=push \
-e DRONE_COMMIT_SHA=<COMMIT_ID> \
-e DRONE_COMMIT_REF=refs/heads/<BRANCH> \
-e DRONE_DEBUG=true \
-e DRONE_DEBUG_PRETTY=true \
plugins/git
+ git init
Initialized empty Git repository in /go/src/bitbucket.org/ORG/PROJECT/.git/
+ git remote add origin https://me:password@bitbucket.org/ORG/PROJECT.git
+ git fetch --no-tags origin +refs/heads/<BRANCH>:
From https://bitbucket.org/ORG/PROJECT
* branch <BRANCH> -> FETCH_HEAD
* [new branch] <BRANCH> -> origin/<BRANCH>
+ git reset --hard -q <COMMIT_ID>
+ git submodule update --init --recursive
But how can I test the plugins/git with the Bitbucket environment variables (DRONE_BITBUCKET, DRONE_BITBUCKET_CLIENT and DRONE_BITBUCKET_SECRET) ?
I’m using docker-compose to run the server and the agent on the same server. This is the yaml configuration:
version: '2'
services:
drone-server:
image: drone/drone:0.8.1
ports:
- 8000:8000
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone
restart: always
environment:
- DRONE_OPEN=true
- DRONE_HOST=https://my.domain.com
- DRONE_BITBUCKET=true
- DRONE_BITBUCKET_CLIENT=<CLIENT_ID>
- DRONE_BITBUCKET_SECRET=<CLIENT_SECRET>
- DRONE_SECRET=<DRONE_SECRET>
- DRONE_ADMIN=me,you
- DRONE_DEBUG=true
- DRONE_DEBUG_PRETTY=true
drone-agent:
image: drone/agent:0.8.1
restart: always
depends_on: [ drone-server ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_HOST=https://my.domain.com
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=<DRONE_SECRET>
- DRONE_DEBUG=true
- DRONE_DEBUG_PRETTY=true
Could you help me on this, please?
Thanks,
Rasmey