This error indicates git clone fails due to missing username and password. Drone provides username and password for private repositories. The most common reasons one encounters this error are the following:
Gitlab is running in private mode
Private mode means public repositories still require username and password to clone. If you have this Gitlab configuration, you need to include DRONE_GITLAB_PRIVATE_MODE=true in your server configuration. This instructs Drone to treat public repositories as private, for authentication purposes. Note you will need to delete / re-add your repository for this to work
Repository changed to private
Sometimes people add a public repository to Drone, but then change the repository to private in Gitlab. The result is that Drone attempts to clone the repository without username and password, and it fails because the repository is now private. To resolve this issue, you need to remove and re-add the repository so it is correctly labeled as private.
It could also be a network issue and not a drone issue. Can you clone your repository from inside a Docker container?
docker run -t -i golang:1.6 git clone http://18.104.22.168:10080/controller/public_test.git
So I suppose the gitlab server is not in “private_mode”.
your local git client could have the credentials cached. The way to know if GitLab is running in private mode is to open a browser in an incognito window and visit your repository in GitLab. If you need to login to view your repository, it is private mode.
Should I also set DRONE_GITLAB_GIT_USERNAME and DRONE_GITLAB_GIT_PASSWORD