Login Failed. Unauthorized

#1

Hi all,

hm - I have a running selfhosted setup with gitea and drone. All on the latest container versions available as they are managed by watchtower. The setup was working quite well with having a repo which is deployed by pushing a new release.

But all of a sudden (I think it might be depending on a container update/ new version) I am not able to log in to drone any more. All I receive is Login Failed. Unauthorized

I tried to check the docker logs and I found following:

{"level":"debug","msg":"api: authentication required","request-id":"1KwWiathEuoKS7wMx8dyVtgoLiI","time":"2019-05-08T08:14:27Z"}

{"level":"debug","msg":"api: guest access","request-id":"1KwWiathEuoKS7wMx8dyVtgoLiI","time":"2019-05-08T08:14:27Z"}

{"fields.time":"2019-05-08T08:14:27Z","latency":288974,"level":"debug","method":"GET","msg":"","remote":"172.17.0.1:55986","request":"/api/user","request-id":"1KwWiathEuoKS7wMx8dyVtgoLiI","time":"2019-05-08T08:14:27Z"}

{"level":"debug","msg":"events: stream opened","request-id":"1KwWiaIm2FTTnUgu82L1dkjfJr2","time":"2019-05-08T08:14:27Z"}

{"fields.time":"2019-05-08T08:14:27Z","latency":33209,"level":"debug","method":"GET","msg":"","remote":"172.17.0.1:55986","request":"/login","request-id":"1KwWiY7tq7xHoJxRxRCjhRcubMh","time":"2019-05-08T08:14:27Z"}

{"fields.time":"2019-05-08T08:14:27Z","latency":31219,"level":"debug","method":"GET","msg":"","remote":"172.17.0.1:55986","request":"/login/form","request-id":"1KwWiTcEQZFUggGxzxWqQFc8rbY","time":"2019-05-08T08:14:27Z"}

{"level":"debug","msg":"events: stream eror","request-id":"1KwWiaIm2FTTnUgu82L1dkjfJr2","time":"2019-05-08T08:14:27Z"}

{"level":"debug","msg":"events: stream closed","request-id":"1KwWiaIm2FTTnUgu82L1dkjfJr2","time":"2019-05-08T08:14:27Z"}

{"level":"debug","msg":"api: guest access","request-id":"1KwWiaIm2FTTnUgu82L1dkjfJr2","time":"2019-0

Not sure if it’s a drone problem or with gitea but also have no idea where to look to see which is the system raising the errors.

Any suggestions on what to do or where to look for the problem?

Thanks, Marcus.

After update from drone-1.0.0-rc.5 to 1.1.0 login not working with gitea
#2

there is an issue regarding @gitea: https://github.com/go-gitea/gitea/issues/6883

#3

Gitea now is an OAuth2 provider and can more securely provide auth, see: [Documentation] Document how Gogs/Gitea login works for steps on how to use OAuth2 with Gitea and Drone.

#4

Changed and it’s also working - thanks for the hint.