tea doesn't understand ssh URL as displayed by Gitea
I have a personal Gitea instance installed on a Raspberry Pi at home as a docker container which I am using to manage my own Git repositories.
To avoid a conflict with the SSH daemon running on the host, I assigned Gitea's built-in sshd a non-default port (2222) both on docker and in the Gitea configuration. Because the usual syntax (
email@example.com:jotoho/somerepo.git) would cause git to connect with the wrong daemon, Gitea correctly displays the SSH URL as
This works in Git but after upgrading from tea
0.8.0, I noticed that tea now fails to correctly determine the location of the repository from the origin remote. Using
gitea.jotoho.de:jotoho/somerepo.git as the remote URL by configuring gitea.jotoho.de's user and port in the SSH config works as expected but this requires an additional step (making the config entry) and results in a situation where the URL dispensed by Gitea is incompatible with tea.
Because of this I would request that support for
ssh://-URLs be (re-)added.
If it would help in making a patch for this, I am willing to provide a temporary account on the instance for debugging/testing purposes and test the PR myself. Unfortunately, I am not familiar with the Go programming language so I can't solve the problem myself.
What do you have configured in
SSHHost in your tea config? (check with
tea logins edit).
You can probably fix this by just changing this value to
gitea.jotoho.de:2222. If not, I'll have to look deeper into this
the only changes made between the Gitea URL working and it deciding to break were:
- Updating tea to
0.8.0(after informing the archlinux maintainer that the package was outdated and waiting for him to publish the new version to the repo)
- An automatic Gitea instance upgrade from
I had determined that an issue with the instance upgrade was (extremely) unlikely given the specifics of this problem, so I filed this issue here instead of the Gitea repo.
Changing the ssh host from
gitea.jotoho.de:2222 inside the tea config makes the URL given by Gitea work.
(It also breaks the trick with the ssh config - presumably since it doesn't recognize the
gitea.jotoho.de short-hand as
gitea.jotoho.de:2222 but this is good enough for me.)
The change I made to my tea config:
diff --git a/.config/tea/config.yml b/.config/tea/config.yml index a1018ac..852ef79 100644 --- a/.config/tea/config.yml +++ b/.config/tea/config.yml @@ -3,7 +3,7 @@ logins: url: https://gitea.jotoho.de token: REDACTED default: true - ssh_host: gitea.jotoho.de + ssh_host: gitea.jotoho.de:2222 ssh_key: /home/jonas/.ssh/id_rsa insecure: false user: jotoho
The old ssh config entry I keep talking about (
Host gitea.jotoho.de Hostname gitea.jotoho.de Port 2222 User git PubkeyAuthentication yes PasswordAuthentication no
I had chosen
gitea.jotoho.de as the name for this host in the configuration (in contrast to something even shorter like
gitea) because that used to make both git and tea
<0.8.0 happy while still being less typing for me.
Deleting a branch is permanent. It CANNOT be undone. Continue?