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

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

Closed
adam8157 opened this issue Nov 2, 2018 · 8 comments
Closed

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

adam8157 opened this issue Nov 2, 2018 · 8 comments
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@adam8157
Copy link

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 Go modules fails with old version Git Go modules fails with old version Git (unknown revision) Nov 2, 2018
@agnivade
Copy link
Contributor

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 Go modules fails with old version Git (unknown revision) cmd/go: go get fails with git version 1.7.1 Nov 2, 2018
@agnivade agnivade added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Nov 2, 2018
@thepudds
Copy link
Contributor

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 changed the title cmd/go: go get fails with git version 1.7.1 cmd/go: go get fails with git version 1.7.1 on CentOS 6.9 Nov 2, 2018
@rasky
Copy link
Member

rasky commented Nov 2, 2018

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

@bcmills
Copy link
Contributor

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
Copy link
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
Copy link
Author

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.

@bcmills
Copy link
Contributor

bcmills commented Jul 2, 2019

As a workaround, note that you can set GOPROXY=https://proxy.golang.org to fetch using HTTPS instead of Git.

@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@seankhliao
Copy link
Member

I believe this can be closed with CentOS 6 having reached EOL on 2020-11-30

Current policy is at #26746 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

9 participants