# Unknown authentication response while running gitea

**URL:** <https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509>\
**Category:** Install/Maintain/Configure\
**Created:** [January 10, 2023, 3:26pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509 "2023-01-10T15:26:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HamidGadirov](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HamidGadirov](https://forum.gitea.com/u/HamidGadirov)\
**Post date:** [January 10, 2023, 3:26pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/1 "2023-01-10T15:26:07Z")

</div>

When I run gitea web command there is an authentication error:  
`failed to initialize orm engine: pg: unknown authentication response: 10`  
Gitea version is 1.4 and PostgreSQL version is 14. I am using the existing gitea configuration on the RAID array. scram-sha-256 is alredy specified in the pg\_hda.conf of the postgres. What can be done to solve this issue? Thanks!

---

<div class="post-metadata">

**Author:** ![jolheiser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jolheiser/32/4807_2.png) [@jolheiser](https://forum.gitea.com/u/jolheiser)\
**Post date:** [January 10, 2023, 3:31pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/2 "2023-01-10T15:31:15Z")

</div>

Are you sure the Gitea version is `1.4`?  
That is extremely outdated (about 5 years), so I’m just clarifying.

If it is, I would recommend trying to update and following the release posts to account for any breaking changes.

---

<div class="post-metadata">

**Author:** ![HamidGadirov](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HamidGadirov](https://forum.gitea.com/u/HamidGadirov)\
**Post date:** [January 11, 2023, 12:31am UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/3 "2023-01-11T00:31:56Z")

</div>

Yes, it is indeed a very outdated version that is in use, this is because this is what was previously in use on the existing RAID array of the server and I didn’t change this. Is there a way to update it without breaking current configurations?

---

<div class="post-metadata">

**Author:** ![HamidGadirov](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HamidGadirov](https://forum.gitea.com/u/HamidGadirov)\
**Post date:** [January 12, 2023, 4:05pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/4 "2023-01-12T16:05:06Z")

</div>

Thanks @jolheiser for the suggestion to upgrade gitea, I did that and now it is 1.18 that is installed.

Now gitea is running, we can e.g. create a new used but the existing users and repositories have not been loaded. I created the PostqreSQL database as was mentioned at [Database Preparation - Docs](https://docs.gitea.io/en-us/database-prep/#postgresql) and added authentication rule to `pg_hba.conf` but the final step (psql -U gitea -d giteadb) throws an error:

```auto
error: connection to server on socket "/var/run/postgresql/.s.PQSQL.5432" failed: FATAL: Peer authentication failed for used "gitea"

```

I created the user and password as well as the database, so neither of these should be missing.  
How can I link the previous database with existing users and repositories?

---

<div class="post-metadata">

**Author:** ![jolheiser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jolheiser/32/4807_2.png) [@jolheiser](https://forum.gitea.com/u/jolheiser)\
**Post date:** [January 12, 2023, 4:10pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/5 "2023-01-12T16:10:43Z")

</div>

What was recommended for older versions (pre 1.14 I think?) is to slowly update one version at a time to make sure migrations run correctly.

Going directly to 1.18 might miss some things from a version that old.

---

<div class="post-metadata">

**Author:** ![HamidGadirov](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@HamidGadirov](https://forum.gitea.com/u/HamidGadirov)\
**Post date:** [January 12, 2023, 4:53pm UTC](https://forum.gitea.com/t/unknown-authentication-response-while-running-gitea/6509/6 "2023-01-12T16:53:48Z")

</div>

Before version 1.4 was installed, very old one, I will try to update one version at a time, thanks.
