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

**URL:** <https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562>\
**Category:** Drone Support\
**Created:** [May 8, 2019, 4:06pm UTC](https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562 "2019-05-08T16:06:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![metalbote](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metalbote/32/5078_2.png) [@metalbote](https://drone.discourse.group/u/metalbote)\
**Post date:** [May 8, 2019, 4:06pm UTC](https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562/1 "2019-05-08T16:06:21Z")

</div>

I upgraded yesterday my drone container, and now i am unable to login as before…

Drone stops with message:  
Login Failed. Unauthorized

Drone log output:

```
{ "level": "debug", "msg": "cannot find remote user: Unauthorized", "time": "2019-05-08T15:55:21Z" }
{ "fields.time": "2019-05-08T15:55:21Z",
  "latency": 47035955,
  "level": "debug",
  "method": "POST",
  "msg": "",
  "remote": "172.20.0.8:58022",
  "request": "/login",
  "request-id": "1KxQldLslBKWKHw7QLaI5W3arjG",
  "time": "2019-05-08T15:55:21Z"
}
{ "fields.time": "2019-05-08T15:55:21Z",
  "latency": 25810,
  "level": "debug",
  "method": "GET",
  "msg": "",
  "remote": "172.20.0.8:58022",
  "request": "/login/error?message=Unauthorized",
  "request-id": "1KxQlhGtIZfJ2a3OiipD5rpZoRQ",
  "time": "2019-05-08T15:55:21Z"
}
{ "level": "debug", "msg": "events: stream cancelled", "request-id": "1KxQdf4SEMErW4f2NJLRRB6mPyh", "time": "2019-05-08T15:55:21Z"
}
{ "level": "debug", "msg": "events: stream closed", "request-id": "1KxQdf4SEMErW4f2NJLRRB6mPyh",
  "time": "2019-05-08T15:55:21Z"
}
{
  "level": "debug",
  "msg": "api: guest access",
  "request-id": "1KxQdf4SEMErW4f2NJLRRB6mPyh",
  "time": "2019-05-08T15:55:21Z"
}
{
  "fields.time": "2019-05-08T15:55:21Z",
  "latency": 63441916989,
  "level": "debug",
  "method": "GET",
  "msg": "",
  "remote": "172.20.0.8:58024",
  "request": "/api/stream",
  "request-id": "1KxQdf4SEMErW4f2NJLRRB6mPyh",
  "time": "2019-05-08T15:55:21Z"
}
{
  "level": "debug",
  "msg": "api: authentication required",
  "request-id": "1KxQlgiMcf2bbDcVimi1DWW6lIc",
  "time": "2019-05-08T15:55:21Z"
}
{
  "level": "debug",
  "msg": "api: guest access",
  "request-id": "1KxQlgiMcf2bbDcVimi1DWW6lIc",
  "time": "2019-05-08T15:55:21Z"
}
{
  "fields.time": "2019-05-08T15:55:21Z",
  "latency": 113649,
  "level": "debug",
  "method": "GET",
  "msg": "",
  "remote": "172.20.0.8:58022",
  "request": "/api/user",
  "request-id": "1KxQlgiMcf2bbDcVimi1DWW6lIc",
  "time": "2019-05-08T15:55:21Z"
}
{
  "level": "debug",
  "msg": "events: stream opened",
  "request-id": "1KxQlgq33Vv2uU8MNaf6id9PqHS",
  "time": "2019-05-08T15:55:21Z"
}

```

On Gitea log:

```
[Macaron] 2019-05-08 15:55:20: Started GET /api/v1/users/metalbote/tokens for 172.18.0.10
[Macaron] 2019-05-08 15:55:21: Completed GET /api/v1/users/metalbote/tokens 200 OK in 43.40004ms,
[Macaron] 2019-05-08 15:55:21: Started GET /api/v1/user for 172.18.0.10,
[Macaron] 2019-05-08 15:55:21: Completed GET /api/v1/user 401 Unauthorized in 1.904842ms
```

---

<div class="post-metadata">

**Author:** ![metalbote](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metalbote/32/5078_2.png) [@metalbote](https://drone.discourse.group/u/metalbote)\
**Post date:** [May 8, 2019, 4:51pm UTC](https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562/2 "2019-05-08T16:51:05Z")

</div>

Reverting back to drone 1-0-0-rc-5, i have now the same error

On drone 1-0-0-rc-5,  
revert drone database from backup, same error  
revert gitea database from backup, error is gone…

Back on drone 1.1.0 error again  
use drone database from backup, same error  
use gitea database from backup, same error

reverting to drone 1.0.0.-rc5  
same as above -\> back on working state

Again to 1.1.0, and error again  
now use gitea database from backup, error  
BUT: use now drone database from backup, error has gone…

Testing, Testing, Testing, but no error again…

This drives me crazy and costs a whole day, damn. And i have no idea …

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [May 8, 2019, 6:36pm UTC](https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562/3 "2019-05-08T18:36:22Z")

</div>

Have you also considered posting to the Gitea discord community to understand why the API call to `GET /api/v1/user 401 Unauthorized` is failing? There were no changes to how Drone performs login between 1.0.0-rc.5 and 1.0.0 final.

> [@metalbote](#):
>
> This drives me crazy and costs a whole day, damn. And i have no idea …

dude, creating Drone cost me 5 years of my life …

---

<div class="post-metadata">

**Author:** ![kimpenhaus](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/kimpenhaus/32/5665_2.png) [@kimpenhaus](https://drone.discourse.group/u/kimpenhaus)\
**Post date:** [May 8, 2019, 6:51pm UTC](https://drone.discourse.group/t/after-update-from-drone-1-0-0-rc-5-to-1-1-0-login-not-working-with-gitea/9562/4 "2019-05-08T18:51:45Z")

</div>

Looks quite like my issue [Login Failed. Unauthorized](http://discuss.harness.io/t/login-failed-unauthorized/4537)

Not sure but it might be because of this: [https://github.com/go-gitea/gitea/issues/6881](https://github.com/go-gitea/gitea/issues/6881)

At least I am hoping so…
