0

I'm having trouble with the gogs ssh url,but am not sure if the web ui config needs corrected, or whether server config needs changed.

The recommended ssh url in the web ui always has the same user and looks like this:

gogs@myserver.com:org/application.git

The problem: That url is not the user's name, nor the complete location on disk of the repository. Is that normal? Replacing the user gets authenticated, but the location is denied.

//no go,  does not appear to be a git repository
git clone ssh://myUserName@myserver.com:org/application.git

My current workaround: The repositories are kept on disk at /gogs-repositories, and I can clone them by going directly to them:

git clone ssh://myUserName@myserver.com:/gogs-repositories/org/application.git

But this modification has drawbacks. There are write permission/collaboration issues that have to be managed through CLI instead of through gogs.

Update:

Fiddling with it, I did get the suggested link to pass initial authenticaton, but debugging shows a gogs specific error

Gogs: "Invalid key ID".
user2782001
  • 3,380
  • 3
  • 22
  • 41

1 Answers1

0

That's actually pretty common, notice that GitHub, GitLab etc actually use git@server regardless of username, the user is identified through the public key instead. The path doesn't use the real physical path because the git server (in this case, gogs) handles everything.

If you haven't been able to clone using the gogs username, you likely haven't set up authentication correctly, browse to yourserver.com/user/settings/ssh and paste your public key there. If you haven't done so already, just run ssh-keygen -t ed25519 in your terminal, leave the directory at its default value unless you have configured a custom location, and paste the content of id_ed25519.pub.

Martheen
  • 5,198
  • 4
  • 32
  • 55
  • ok, well now If i debug git clone from client side, the server response includes "Gogs: Internal error". nothing in the gogs.log though. – user2782001 Jul 25 '23 at 20:44
  • answered the question. Fiddling with it, I got the ssh part to authenticate, but the error I get is "Gogs: Invalid key ID". – user2782001 Jul 26 '23 at 02:33