Gitea shows ssh url identical to the https url


I just installed Gitea (from the Debian package – Debian version 1.3.2+dfsg-3, which is based on version 1.3.2 of Gitea), and it was quite easy to install.

Now, there is one thing that didn’t work: I logged in, created a repository (repo) and the web interface showed me this HTTPS URL:


Which is good (I could clone the repo from that URL, using my user and password).

But if I click on “SSH”, it doesn’t change the URL shown.

However, if I use this:


I can access the repository via ssh without problems.

So it seems that something got wrong in the web interface. Did I configure something wrong? The server is behind a reverse http proxy (Apache), so ROOT_URL is the external url, different from DOMAIN (but on the same host). This is what I have in app.ini:

ROOT             = /var/lib/gitea/repositories
PROTOCOL         = http
DOMAIN           = myhost.domain
HTTP_PORT        = 3000
ROOT_URL         = https://somewhere:3000
DISABLE_SSH      = false
SSH_PORT         = 22
OFFLINE_MODE     = false

I’d like to know if I got something misconfigured before report any bugs (in the Debian BTS or in Gitea Github page).

Is there any other information that may be needed to debug this?

Thank you!

ROOT_URL should still be the URL you expose for Gitea - not the one you make apache do reverse proxying to.

Do you have sections in your app.ini? You seem to be missing them, gitea is probably running using the defaults in may cases. ROOT should go under [repository], PROTOCOL under [server]. Here’s the doc. If you want a template of how it should look like, here you go:

APP_NAME = Gitea
RUN_USER = howl
RUN_MODE = dev

SECRET_KEY     = Stripped

DB_TYPE  = mysql
HOST     =
NAME     = gitea
USER     = root
SSL_MODE = disable
PATH     = data/gitea.db

ROOT = /home/howl/gitea-repositories

SSH_DOMAIN       = localhost
DOMAIN           = localhost
HTTP_PORT        = 3000
ROOT_URL         = http://localhost:3000/
DISABLE_SSH      = false
SSH_PORT         = 22
OFFLINE_MODE     = false

ENABLED = false

REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = true
NO_REPLY_ADDRESS                  =

DISABLE_GRAVATAR        = false




MODE      = file
LEVEL     = Warning
ROOT_PATH = /home/howl/go/src/


(This is what I use in my dev environment - you may want to tweak some parts)

Oh, wait. My ROOT_URL does not have the :3000 port. Sorry, that was a spurious paste. It is more like

DOMAIN      = myhost.domain
HTTP_PORT        = 3000
ROOT_URL = https://myhost.mydomain

So, ROOT_URL is indeed the URL I expose for Gitea. (the reverse proxying redirects from HTTPS to Gitea listening on 3000).

I changed the default ROOT_URL because, as the docs say, it’s supposed to be used “the internal and the external URL don’t match (e.g. in Docker)”.

Yes, my config has sections, but I only copied the parts that I thought were relevant. Should I paste the full config here?

Hmm, let’s try something else first. Can you try to do view source on the repository page and look for <input id="repo-clone-url"? Can you paste the html of that part of the page here? (I want to see if the ssh link is somewhere and it just can’t be shown, if the ssh clone link is also an https link in the code or if it’s actually not rendered by the template)

Oh, here it is:

                                    <div class="ui action tiny input" id="clone-panel">
					<button class="ui basic clone button" id="repo-clone-https" data-link="">
					<button class="ui basic clone button" id="repo-clone-ssh" data-link="">
					<input id="repo-clone-url" value="" readonly>
					<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="Copy" data-success="Copied!" data-error="Press ⌘-C or Ctrl-C to copy" data-content="Copy" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
						<i class="octicon octicon-clippy"></i>
				<div class="ui basic jump dropdown icon button poping up" data-content="Download this repository" data-variation="tiny inverted" data-position="top right">
					<i class="download icon"></i>
					<div class="menu">
						<a class="item" href="/jcp/myrepo/archive/"><i class="octicon octicon-file-zip"></i> ZIP</a>
						<a class="item" href="/jcp/myrepo/archive/master.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>

So both URLs are there… But the button isn’t switching from https to ssh… (?)

Can you open up your browser’s console and check if there are any errors? Can you try with another browser?

Well – the same happens in both Firefox and Google Chrome (in both of them the URL doesn’t change when I click on SSH).

Yes, there is an error on the console:

jQuery.Deferred exception: $(...).autolink is not a function @

This is from FF; the same error shows up in Chrome:

jquery.min.js:2 jQuery.Deferred exception: $(...).autolink is not a function TypeError: $(...).autolink is not a function
    at HTMLDocument.<anonymous> (…:1473:20)
    at mightThrow (
    at process ( undefined
jquery.min.js:2 Uncaught TypeError: $(...).autolink is not a function
    at HTMLDocument.<anonymous> (index.js?v=7e44814bf…7acbb3e58614bb:1473)
    at mightThrow (jquery.min.js:2)
    at process (jquery.min.js:2)

I also tried building from git master, and then nothing wrong happens – so I suppose this is a problem with either the Debian package, or the version that they have packaged (which is outdated anyway).

So, it seems to be up to the Debian maintainer to update and fix the package.

However – I would rather run packaged software instead of running from source, so if this is something that can be trivially fixed, I would be interested in the solution (so I’d stick to the Debian package).

Thanks a lot for your help!

I think you need to install the gitea-common package. I’m no expert about the debian package though. The maintainer gave up on it in february iirc.

gitea-common is already installed… I’ll consider switching to a locally-compiled version.

Thank you for answering!

1 Like