Forum

Need some help? Ask our community for its assistance!

You are not logged in.

#1 07-12-2019 07:17:48

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

ssh git push access to gitea fails

Hi

In my gitea setup on alwaysdata, there are some "Site administration" settings that I don't know how to change. Presumably there is a config file somewhere in my files but I don't know where to find that.

One of the settings, under Configuration > SSH Configuration is server domain.
This is set to

$user.alwaysdata.net

(fbarton.alwaysdata.net in my case)

So when you are in a repo and you want to clone it, the auto-generated SSH URL for this is

$user@$user.alwaysdata.net:$user/$repo.git

However when connecting from my local machine to this URL, the connection is refused.

If I change my local git remote config to

$user@ssh-$user.alwaysdata.net:$user/repo.git

and then push, the push almost succeeds, but then fails with an error:

Gitea: Internal error
UpdatePublicKey: Post http://127.2.46.150:8101/api/internal/ssh/1/update: dial tcp 127.2.46.150:8101: connect: connection refused
To ssh-$user.alwaysdata.net:$user/$repo.git
 ! [remote rejected] $branch -> $branch (pre-receive hook declined)

How can I get my SSH connection to the server to work, so that I can push to the git repo?

Offline

#2 07-12-2019 07:28:10

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

Re: ssh git push access to gitea fails

Having looked here, I can report that I can connect as expected to gitea via ssh,

ssh git@myremote.example

gives the expected success reponse.

The following section ("SSH Common Errors") is relevant.
I have run the

Update the '.ssh/authorized_keys' file with Gitea SSH keys

script as suggested.

Offline

#3 07-12-2019 07:34:00

francisbarton
Membre
Registered: 28-02-2018
Posts: 8

Re: ssh git push access to gitea fails

I have just altered the

SSH_DOMAIN

setting in my gitea setup and restarted.
(https://docs.gitea.io/en-us/config-cheat-sheet/)

This successfully changes the SSH clone URL in the repo, but I still get the same error when I push.

Last edited by francisbarton (07-12-2019 07:36:06)

Offline

Board footer

Powered by FluxBB