Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required git version bump to 2.7.0 since v1.8.0 #6930

Closed
2 of 7 tasks
bammab opened this issue May 13, 2019 · 6 comments · Fixed by #7065
Closed
2 of 7 tasks

Required git version bump to 2.7.0 since v1.8.0 #6930

bammab opened this issue May 13, 2019 · 6 comments · Fixed by #7065
Labels
Milestone

Comments

@bammab
Copy link

bammab commented May 13, 2019

  • Gitea version (or commit ref): 1.8.1
  • Git version: 1.8.3.1
  • Operating system: Centos 7
  • 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

Since v1.8.0 the mirror repos did not show the remote url anymore. The log file gaves the answer.
Gitea try to use the command "git remote get-url origin", but this was not supported by the installed version.

The change comes with following commit: b3e757a
(See changed file https://github.com/go-gitea/gitea/commits/master/models/repo_mirror.go)

The min required version of git is: GitVersionRequired = "1.7.2" - so there is no error about this incompatibility.
(See https://github.com/go-gitea/gitea/blob/master/modules/git/git.go)

Is it possible to use "git config --get remote.origin.url" instead of the current behavior? Temporary I use an current version of git from the scl repo (SoftwareCollections) for gitea, but I think it's a problem for most enterprise distros like centos and debian (which is very restrictive the most time, too).

@lunny
Copy link
Member

lunny commented May 13, 2019

https://github.com/go-gitea/gitea/blob/master/modules/git/git.go is not right, but I think we may need to downgrade the git version requirement.

@lunny lunny added the type/bug label May 13, 2019
@zeripath
Copy link
Contributor

Sorry about this. This was part of a bug fix for an extremely serious security issue.

I will take a look - but could you also take a look to ensure that they're functionality equivalent too.

@zeripath
Copy link
Contributor

I suspect this is the same issue as #6896

@lunny
Copy link
Member

lunny commented May 28, 2019

Maybe we need a docker with old git to run the tests.

@zeripath
Copy link
Contributor

Well we should probably ensure that the git in our docker matches our minimum required git.

@zeripath
Copy link
Contributor

OK git config --get remote.<name>.url is not equivalent to git remote get-url <name> although it is if you don't have an insteadOf set. As this technically incorrect result is not a downgrade from the situation prior to my bug-fix rather than spending time reimplementing git remote get-url - those people using old gits and insteadOf will just have to suffer it being wrong. I'll write a PR that checks the git version and uses get-url if it is available otherwise will use the old thing.

@lafriks lafriks added this to the 1.8.2 milestone May 29, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants