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

Open
adam8157 opened this issue Nov 2, 2018 · 7 comments

Comments

@adam8157
Copy link

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

This comment has been minimized.

Copy link
Contributor

@agnivade 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
@thepudds

This comment has been minimized.

Copy link

@thepudds 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 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

This comment has been minimized.

Copy link
Member

@rasky rasky commented Nov 2, 2018

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

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills 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.

Copy link
Contributor

@ianlancetaylor 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.

Copy link
Author

@adam8157 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

This comment has been minimized.

Copy link
Member

@bcmills 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.