Skip to content

Cant clone or push via SSH due to key issue after upgrading to 1.5.3 #5319

Closed
@felixgonsug

Description

@felixgonsug
  • Gitea version (or commit ref): 1.5.3
  • Git version: 2.19.1
  • Operating system: FreeBSD 11.2-RELEASE
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

After upgrading Gitea FreeBSD port to 1.5.3, when i try to interact with any repository via ssh, this is what i get:

$ git clone ssh://[email protected]:22/repository.git
Cloning into 'repository'...
Enter passphrase for key '/home/user/.ssh/id_rsa':
Gitea: Invalid key ID
Invalid key ID[key-7]: pq: column "login_source_id" does not exist
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I checked the .ssh/authorized_keys and the key is present and with the correct ID, I also checked the database and the key is present with the same ID in the public_key table. The column login_source_id is not present in the public_key table.

The key was added via the web interface. For some reason gitea is not creating the column login_source_id.

This is what i get in /log/gitea/serv.log

2018/11/12 00:06:15 [...io/gitea/cmd/serv.go:203 runServ()] [F] Invalid key ID[key-7]: pq: column "login_source_id" does not exist

And this from /log/gitea/xorm.log

[I] [SQL] SELECT "id", "owner_id", "name", "fingerprint", "content", "mode", "type", "login_source_id", "created_unix", "updated_unix" FROM "public_key" WHERE "id"=$1 LIMIT 1 []interface {}{7}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions