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

cmd/go: go get fails with git version 1.7.1 on CentOS 6.9 #28550

Open
adam8157 opened this Issue Nov 2, 2018 · 6 comments

Comments

Projects
None yet
6 participants
@adam8157

adam8157 commented Nov 2, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.1 linux/amd64

What did you do?

Just go get something with the Modules mode

What happened?

go: unknown revision xxxxxxxx
go: error loading module requirements

Root cause

git command below is what go get -x shows.

$ git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' xxxxxxxx
Unknown option: -c
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
           [--help] COMMAND [ARGS]

$ git version
git version 1.7.1

$ cat /etc/*issue
CentOS release 6.9 (Final)

@adam8157 adam8157 changed the title from Go modules fails with old version Git to Go modules fails with old version Git (unknown revision) Nov 2, 2018

@agnivade

This comment has been minimized.

Member

agnivade commented Nov 2, 2018

Actually, we added the -c log.showsignature=false to support git versions lower than 2.10. 90066bf

Most recent systems have 2.7.4. Git 1.7 seems to have been released on 2010. Not sure how far back are we willing to go to support git versions. Perhaps it goes back to @bcmills' comment here to explicitly specify a minimum git version.

/cc @bcmills @rsc

@agnivade agnivade changed the title from Go modules fails with old version Git (unknown revision) to cmd/go: go get fails with git version 1.7.1 Nov 2, 2018

@thepudds

This comment has been minimized.

thepudds commented Nov 2, 2018

#26746 tracks defining a minimum support version of git (or perhaps instead a set of supported distro versions).

One comment from there:

The table at https://en.wikipedia.org/wiki/Git#Release says that Git 2.12 and older are themselves no longer maintained.

1.7 is pretty old.

@adam8157 are you able to upgrade your version of git?

@thepudds thepudds added the modules label Nov 2, 2018

@thepudds thepudds changed the title from cmd/go: go get fails with git version 1.7.1 to cmd/go: go get fails with git version 1.7.1 on CentOS 6.9 Nov 2, 2018

@rasky

This comment has been minimized.

Member

rasky commented Nov 2, 2018

FWIW, git -c was added in git 1.7.2:
git/git@8b1fa77

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 2, 2018

According to the table at https://wiki.centos.org/About/Product, CentOS6 is currently on version 6.10. Any idea whether that comes with a newer Git?

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Nov 2, 2018

Looks like it is still git 1.7.1.

Since CentOS is intended to be long term stable, they are unlikely to update anything except to fix bugs.

@adam8157

This comment has been minimized.

adam8157 commented Nov 3, 2018

This happens on my testing env which is the same as my deployment env, it's OK to upgrade. However, I guess CentOS/RHEL 6 is still a big player, especially as the production OS, in the Linux world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment