-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: unable to "go get" repository with external LFS server (go modules) #39720
Comments
Related #25605, especially this comment.
|
tbh, I wasn't sure if this was more appropriate as a
|
See also #29987 (also related to LFS). |
See also #38941 (comment) (somehow related to git-lfs smudging). |
This issue is four years old. Why isn't this fixed yet? |
@pebbe This is open source software and this is not a common case. If you are running into this I would encourage you to send in a patch. See https://go.dev/doc/contribute. Thanks. |
I don't have the expertise to fix |
This is weird. I have this file package main
import (
"fmt"
"github.com/pebbe/tokenize"
)
func main() {
s, err := tokenize.Dutch("Dit is een test. En dit, misschien?", true)
fmt.Println(err)
fmt.Println(s)
} I try to build this (Go version 1.23.0), but it fails because of lfs:
Let's begin again:
I set this variable, but I don't know what this is suppose to change:
Now try again. It works. I notice that
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a repository that use Git LFS, with a external LFS server configured via a
.lfsconfig
file in the root of the repository (docs).When I attempt to
go get
a package in this repo in "module-aware mode", it fails with the following error:As far as I can tell, the problem seems to be due to the way that
go get
clones the git repository.git init --bare
git remote add origin github.com/campbellr/goproject
git fetch
git archive
thepackage/
directorySince
git archive
is running in a bare repository, there is no.lfsconfig
, sogit-lfs
doesn't fetch the objects from the right lfs server and gets a 404.Note that the same
go get
will succeed inGOPATH
mode (since it just does a normalgit clone
)The text was updated successfully, but these errors were encountered: