gogs: Can't push using SSH keys

Hi,

my coworker and I deployed a Gogs server internally, but we’re having problem using SSH keys as an authentication method.

We get the following error:

$ git push
Gogs: Repository owner does not exist
Unregistered owner: XXX
fatal: Could not read from remote repository.

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

The serv.log file says:

2016/01/29 16:14:35 [...ts/gogs/cmd/serve.go:165 runServ()] [F] Unregistered owner: XXX

If we try to login via SSH, we obtain this successful message:

$ ssh -T git@gogs
Hi there, You've successfully authenticated, but Gogs does not provide shell access.
If this is unexpected, please log in with password and setup Gogs under another user.

We already tried using the “Rewrite the .ssh/authorized_keys file” functionality, or linking the conf/app.ini to the custom/conf/app.ini file, but to no avail.

However, we can connect and push to the server using HTTPS.

Can you help us find the problem? We’re running a Gogs compiled from the sources on a Debian 8, using SQLite3 as the DBMS.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

For those who use SSH on a different port from 22, solution is adding ssh:// at the beginning:

git push ssh://git@example.com:1234/myuser/myrepo

I’m facing similar issue.

  1. git clone works over ssh for a private repo.
  2. git push works for https
  3. ssh -v gogs@myserver, says i’m authenticated.
  4. when I push to remote named origin it displays the error although i’m owner of the repo.
Gogs: Repository owner does not exist
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  1. If I change the remote name to something else, git push works over ssh.

Thoughts?