[x]
):The URL that appears on all the repository pages for the git clone option ends with ".git". If I manually remove it when performing git clone, all works good.
What can I modify in the app.init such that I don't get the '.git' in the URL link?
[repository]
ROOT = /mnt/dietpi_userdata/gitea/gitea-repositories
DISABLE_HTTP_GIT = false
USE_COMPAT_SSH_URI = true
[server]
DOMAIN = git.someString.local
; SSH_DOMAIN = localhost
HTTP_PORT = 3000
; ROOT_URL = http://localhost:3000/
ROOT_URL = http://git.someString.local:3000/
; ROOT_URL = http://%(DOMAIN)s:%(HTTP_PORT)s/
DISABLE_SSH = false
SSH_DOMAIN = %(DOMAIN)s
SSH_PORT = 22
; SSH_ROOT_PATH = /mnt/dietpi_userdata/gitea/.ssh
SSH_ROOT_PATH = /home/dietpi/.ssh
LFS_START_SERVER = true
LFS_CONTENT_PATH = /mnt/dietpi_userdata/gitea/data/lfs
LFS_JWT_SECRET = ***************
OFFLINE_MODE = false
It is supposed to end with .git
.
@CirnoT But it should end with .git
for SSH protocol, the picture shows the URL for HTTP:
git clone http://git.someString.local:3000/USER/REPO
Right?
Not... git clone http://git.someString.local:3000/USER/REPO.git
HTTP(S) protocol also should end with .git
@jolheiser So you are saying this reference:
You clone a repository with git clone
. For example, if you want to clone the Git linkable library called libgit2, you can do so like this:
$ git clone https://github.com/libgit2/libgit2
Is rubbish?
How do you explain this terminal output?
$ git clone http://git.DOMAIN.local:3000/USER/REPO.git
Cloning into 'REPO'...
fatal: unable to access 'http://git.DOMAIN.local:3000/USER/REPO.git/': Failed to connect to git.DOMAIN.local port 3000: Connection refused
USER@probook MINGW64 ~/Documents/Gitea_projects/test
$ git clone http://git.DOMAIN.local:3000/USER/REPO
Cloning into 'REPO'...
remote: Enumerating objects: 498, done.
remote: Counting objects: 100% (498/498), done.
remote: Compressing objects: 100% (411/411), done.
remote: Total 498 (delta 256), reused 105 (delta 68)MiB/s
Receiving objects: 100% (498/498), 27.59 MiB | 3.16 MiB/s, done.
Resolving deltas: 100% (256/256), done.
@Adito5393 you'll note if you go to https://github.com/libgit2/libgit2 github will give you the clone URL with .git
. Gitea also provides the clone URL in the same pattern. Because some users copied/pasted the URL from the browser bar instead of where Gitea provides the URL to clone and complained it didn't work a redirect was put in place to the correct location (ending with .git
). Github has the same redirect. The URL Gitea provides is correct, it appears something is broken with your install if the correct url ending in .git
is not working.
If you don't want Gitea to have the correct URL into the clone box, you are free to customize your instance templates using these instructions https://docs.gitea.io/en-us/customizing-gitea/, perhaps a JS script that looks for the clone box and removes .git
.
If you'd like help debugging why the correct URL is not working we have chat where we can help you at https://discord.gg/gitea
The explanation is not rubbish, as most services allow both URLs to work.
Both of these URLs should resolve
https://try.gitea.io/jolheiser/ciw.git
https://try.gitea.io/jolheiser/ciw
For example, even GitHub adds the .git
@jolheiser @techknowlogick
You are right, I'm sorry! I've updated my git to latest windows x64 -> v2.26.2 and not git clone URL.git
works
I'll close the ticket! Thanks for the fast reply!