I tried different approaches in this forum, but no luck. I can curl repository successfully, here is my .env config for drone docker:
Gitea logs shows Unauthorized access.
Repository is in organization. Organization available for logged in users, repository is not private.
I learned there are many and many different forum topics here about this problem and almost each one of them use outdated env variables and configuration options.
Drone successfully gets commits, starts builds, but I always get this error about could not read Username.
I don’t understand why it won’t even use my special drone gitea users username and password, since this user specifically added into organization for drone to work without problems.
I added it into the starting script like this:
docker stop drone
docker rm drone
docker run \
I’m using latest available versions of Drone and Gitea.
Drone runner also working via docker.
I think I am having trouble understanding this issue report. Where do you experience this issue? What are steps to produce? What are the expected results? What are the actual results?
I ask because this looks like a git clone error, but reading the issue description I could not be certain.
You also mentioned you searched existing threads and tried different approaches. Which approaches have you tried? The most common root causes are related to networking (using docker networks and running everything on the same server) and issues related to private mode. Have you ruled these out? If so how?
I’m really sorry for making duplicate thread.
I was confused by previous resolutions that used older versions than current.
Thought it’s kinda new error.
In the end, I overcame this error with different approach (not fixing oauth drone-gitea, if I’m right)
In the end, what I did:
- I created drone user in my gitea instance.
- Added it to needed internal repositories and organizations read-only mode.
- Used it’s username and password in those env variables:
- It worked.
In the end I needed to force git auth for drone.
Again, sorry for not trying everything.
I run into the same issue and the FAQ for that error couldn’t help me solve it…
Here is some backgrounds info :
I had a clear instance of gitea & drone running good with docker-compose on the same server.
A few repository were deploying nicely with drone.
Then I had to create and organisation and move one of them into it passing ownership.
That is when things start to go wrong and I get stuck with that error ''Fatal: could not read Username for GITEA_URL : terminal prompts disabled ‘’
Yet the error I had is slightly different, I post here because it is the solution mentionned by @idchlife that got me to solve the issue.
I believe it is just a work-around and I would love to have a more stable solution for that problem.
I haven’t got the opportunity to do so but it might be easily reproducable when you switch repo to organisation ownership…