git clone via ssh will hold #2640

Closed
opened 2025-11-02 04:43:07 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @haytoo1 on GitHub (Dec 8, 2018).

  • Gitea version (or commit ref): 1.6.0
  • Git version: 1.8.3.1
  • Operating system: centos 7.5 (kernel 3.10.0-862.el7.x86_64)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

git clone via ssh does not work. via http is ok.
First of all, it's fine to use your docker image,
But I download the binary file run does not work.

i run gitea use git user,
/home/git/.ssh/authorized_keys have no duplicate key, permission is 600,

this is app.ini:

RUN_USER = git
RUN_MODE = prod


[server]
START_SSH_SERVER = true
SSH_DOMAIN       = git.tooto.cc
DOMAIN           = git.tooto.cc
HTTP_PORT        = 3000
ROOT_URL         = http://git.tooto.cc/
DISABLE_SSH      = false
SSH_PORT         = 10022
LFS_START_SERVER = true
LFS_CONTENT_PATH = /home/git/gitea/data/lfs
LFS_JWT_SECRET   = ******
OFFLINE_MODE     = false

the three screenshots are the packets I grabbed with tcpdump when I executed 'git cloning *****'
...

Screenshots

1
2
3

Originally created by @haytoo1 on GitHub (Dec 8, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.6.0 - Git version: 1.8.3.1 - Operating system: centos 7.5 (kernel 3.10.0-862.el7.x86_64) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description git clone via ssh does not work. via http is ok. First of all, it's fine to use your docker image, But I download the binary file run does not work. i run gitea use `git` user, `/home/git/.ssh/authorized_keys` have no duplicate key, permission is 600, this is app.ini: ``` RUN_USER = git RUN_MODE = prod [server] START_SSH_SERVER = true SSH_DOMAIN = git.tooto.cc DOMAIN = git.tooto.cc HTTP_PORT = 3000 ROOT_URL = http://git.tooto.cc/ DISABLE_SSH = false SSH_PORT = 10022 LFS_START_SERVER = true LFS_CONTENT_PATH = /home/git/gitea/data/lfs LFS_JWT_SECRET = ****** OFFLINE_MODE = false ``` the three screenshots are the packets I grabbed with tcpdump when I executed 'git cloning *****' ... ## Screenshots ![1](https://user-images.githubusercontent.com/13486575/49687817-93737c80-fb43-11e8-99d7-186538f75b82.png) ![2](https://user-images.githubusercontent.com/13486575/49687826-bbfb7680-fb43-11e8-895b-0cc99fcc54d2.png) ![3](https://user-images.githubusercontent.com/13486575/49687827-be5dd080-fb43-11e8-848e-0b73f0a3b44b.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/bug label 2025-11-02 04:43:07 -06:00
Author
Owner

@lunny commented on GitHub (Dec 9, 2018):

Please check your git version when you enable git lfs. You can try to disable git lfs.

@lunny commented on GitHub (Dec 9, 2018): Please check your git version when you enable git lfs. You can try to disable git lfs.
Author
Owner

@haytoo1 commented on GitHub (Dec 9, 2018):

it works.
The default git version for centos7.5 is 1.8.
When I turn off LFS , The problem was fixed.

LFS_START_SERVER = false

thanks, have a nice day 👍

@haytoo1 commented on GitHub (Dec 9, 2018): it works. The default git version for centos7.5 is 1.8. When I turn off LFS , The problem was fixed. ``` LFS_START_SERVER = false ``` thanks, have a nice day 👍
Author
Owner

@haytoo1 commented on GitHub (Dec 9, 2018):

I have a suggestion, if git version is not high enough, LFS_START_SERVER = false should be by default .
Otherwise the fault is confusing

@lunny

@haytoo1 commented on GitHub (Dec 9, 2018): I have a suggestion, if git version is not high enough, `LFS_START_SERVER = false` should be by default . Otherwise the fault is confusing @lunny
Author
Owner

@lunny commented on GitHub (Dec 9, 2018):

@haytoo1 I think this is a bug of gitea, I will try to fix it.

@lunny commented on GitHub (Dec 9, 2018): @haytoo1 I think this is a bug of gitea, I will try to fix it.
Author
Owner

@lunny commented on GitHub (Dec 9, 2018):

@haytoo1 please confirm https://github.com/go-gitea/gitea/pull/5501 fix your problem even if LFS_START_SERVER = true

@lunny commented on GitHub (Dec 9, 2018): @haytoo1 please confirm https://github.com/go-gitea/gitea/pull/5501 fix your problem even if `LFS_START_SERVER = true`
Author
Owner

@haytoo1 commented on GitHub (Dec 9, 2018):

sorry  ̄□ ̄||
I don't know how to test, download the latest master branch, and then compile and install?

@haytoo1 commented on GitHub (Dec 9, 2018): sorry  ̄□ ̄|| I don't know how to test, download the latest master branch, and then compile and install?
Author
Owner

@lunny commented on GitHub (Dec 10, 2018):

No. You have to apply the patch yourself and compile gitea yourself.

@lunny commented on GitHub (Dec 10, 2018): No. You have to apply the patch yourself and compile gitea yourself.
Author
Owner

@haytoo1 commented on GitHub (Dec 10, 2018):

emmm, I don't know golang,
but I tried:

// 1. clone
git clone --single-branch -b lunny/fix_lfs_warn_log  https://github.com/lunny/gitea.git

// 2. install golang set go env
GOPATH="/root/gitea", 

/root/gitea is gitea code.

then run go get, go install, make, error message:

go build -i -v  -tags '' -ldflags '-s -w -X "main.Version=3ae520b" -X "main.Tags="' -o gitea
main.go:13:2: cannot find package "code.gitea.io/gitea/cmd" in any of:
	/usr/local/go/src/code.gitea.io/gitea/cmd (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/cmd (from $GOPATH)
main.go:14:2: cannot find package "code.gitea.io/gitea/modules/log" in any of:
	/usr/local/go/src/code.gitea.io/gitea/modules/log (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/modules/log (from $GOPATH)
main.go:18:2: cannot find package "code.gitea.io/gitea/modules/markup/csv" in any of:
	/usr/local/go/src/code.gitea.io/gitea/modules/markup/csv (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/modules/markup/csv (from $GOPATH)
main.go:19:2: cannot find package "code.gitea.io/gitea/modules/markup/markdown" in any of:
	/usr/local/go/src/code.gitea.io/gitea/modules/markup/markdown (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/modules/markup/markdown (from $GOPATH)
main.go:20:2: cannot find package "code.gitea.io/gitea/modules/markup/orgmode" in any of:
	/usr/local/go/src/code.gitea.io/gitea/modules/markup/orgmode (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/modules/markup/orgmode (from $GOPATH)
main.go:15:2: cannot find package "code.gitea.io/gitea/modules/setting" in any of:
	/usr/local/go/src/code.gitea.io/gitea/modules/setting (from $GOROOT)
	/root/gitea/src/code.gitea.io/gitea/modules/setting (from $GOPATH)
make: *** [gitea] Error 1

so can you give me binary file for test? Or you test it yourself, Just make sure git version 1.8.
because I use gitea-1.6.0 with git-2.18 is ok

@haytoo1 commented on GitHub (Dec 10, 2018): emmm, I don't know golang, but I tried: ``` // 1. clone git clone --single-branch -b lunny/fix_lfs_warn_log https://github.com/lunny/gitea.git // 2. install golang set go env GOPATH="/root/gitea", ``` /root/gitea is gitea code. then run `go get`, `go install`, `make`, error message: ``` go build -i -v -tags '' -ldflags '-s -w -X "main.Version=3ae520b" -X "main.Tags="' -o gitea main.go:13:2: cannot find package "code.gitea.io/gitea/cmd" in any of: /usr/local/go/src/code.gitea.io/gitea/cmd (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/cmd (from $GOPATH) main.go:14:2: cannot find package "code.gitea.io/gitea/modules/log" in any of: /usr/local/go/src/code.gitea.io/gitea/modules/log (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/modules/log (from $GOPATH) main.go:18:2: cannot find package "code.gitea.io/gitea/modules/markup/csv" in any of: /usr/local/go/src/code.gitea.io/gitea/modules/markup/csv (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/modules/markup/csv (from $GOPATH) main.go:19:2: cannot find package "code.gitea.io/gitea/modules/markup/markdown" in any of: /usr/local/go/src/code.gitea.io/gitea/modules/markup/markdown (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/modules/markup/markdown (from $GOPATH) main.go:20:2: cannot find package "code.gitea.io/gitea/modules/markup/orgmode" in any of: /usr/local/go/src/code.gitea.io/gitea/modules/markup/orgmode (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/modules/markup/orgmode (from $GOPATH) main.go:15:2: cannot find package "code.gitea.io/gitea/modules/setting" in any of: /usr/local/go/src/code.gitea.io/gitea/modules/setting (from $GOROOT) /root/gitea/src/code.gitea.io/gitea/modules/setting (from $GOPATH) make: *** [gitea] Error 1 ``` so can you give me binary file for test? Or you test it yourself, Just make sure git version 1.8. because I use gitea-1.6.0 with git-2.18 is ok
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2640