-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Gitea ignores path to git binary #8643
Comments
As a work-around I currently set |
OK, so looking at this - master and 1.9 don't use "git" directly except in one place as a fallback in git.Init and in the install page. Do you have any more information about when the wrong git is used? Is it when you're pushing/pulling over SSH because that's the only place I can think that won't use the correct git necessarily? |
@zeripath that's a good question, how can I check? I just went with the information I found on the Configuration page in the site settings, it said "git version 1.8.3.1" there even though I had configured the path to point to the newer version. |
oh that's interesting... Let me have a look again... |
Ah. Found this out - although we use GitExecutable throughout our code, the code to use If you cannot use 1.10-rc or master but can recompile gitea you would be able to change the default value from the linker using LDFLAGS="-X "code.gitea.io/gitea/modules/git.GitExecutable=YOUR_PATH"" |
FYI #6772 is the PR that provided this function. It would likely be possible to cherry-pick it on to 1.9.4 too. |
As this feature is implemented but not planned to be backported I will close this issue. |
I have it fixed with the work-around right now and can wait for the proper release of 1.10, so no problem. |
Sorry about that! There's definitely an issue with ssh though - I think that needs some more thought. We might have to be putting git on the executable path etc. |
[x]
):N/A
Description
The current version of Git in the RHEL 7 repositories is 1.8.3.1. This version is quite old so I would like to use one of the more recent versions available in the SCL repository. However, SCL packages install everything outside of the regular directories, in
/opt/rh
. I've set thePATH
in the[git]
section of mygitea.ini
file to point to the git binary (/opt/rh/rh-git218/root/usr/bin/git
) but gitea seems to completely ignore this option and keeps using the git version that it finds in it'sPATH
environment variable, which is/usr/bin/git
The text was updated successfully, but these errors were encountered: