git-gitlab icon indicating copy to clipboard operation
git-gitlab copied to clipboard

Not able to follow OSX installation instructions

Open asfaltboy opened this issue 8 years ago • 5 comments

First I follow the README and do:

$ go get gopkg.in/libgit2/git2go.v23

# gopkg.in/libgit2/git2go.v23
could not determine kind of name for C.GIT_CHECKOUT_DONT_WRITE_INDEX
could not determine kind of name for C.GIT_CHECKOUT_RECREATE_MISSING

I ignore the errors and continue with the README.

Then I read this note

OSX El Capitan users may encounter the following error

could not determine kind of name for C.GIT_CHECKOUT_SAFE_CREATE

when running

$ go get gopkg.in/libgit2/git2go.v22

So I follow to the libgit2 issue thread and try

$ brew unlink libgit2
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew/d6a9bb6adeb2043c5c5e9ba3a878decdefc1d240/Library/Formula/libgit2.rb
$ brew switch libgit2 0.22.3
$ go get gopkg.in/libgit2/git2go.v22

Happy to see no errors return, I continue to build:

$ git clone numa08/git-gitlab
$ cd git-gitlab
$ make build
go build -o build/git-lab
global-gitconfig.go:5:2: cannot find package "gopkg.in/libgit2/git2go.v24" in any of:
	/usr/local/Cellar/go/1.7.3/libexec/src/gopkg.in/libgit2/git2go.v24 (from $GOROOT)
	/Users/pavel/dev/go/src/gopkg.in/libgit2/git2go.v24 (from $GOPATH)
make: *** [build] Error 1

So now it needs v24 of git2go ? What is going on here? I try

go get gopkg.in/libgit2/git2go.v24
# gopkg.in/libgit2/git2go.v24
could not determine kind of name for C.GIT_CHECKOUT_DONT_WRITE_INDEX
could not determine kind of name for C.GIT_CHECKOUT_RECREATE_MISSING

Nothing seems right... is there a workaround I'm missing?

asfaltboy avatar Nov 05 '16 07:11 asfaltboy

+1, same error, same step tried to debug. Pls send halp 🆘 ❤️

clemherreman avatar Nov 14 '16 15:11 clemherreman

@clemherreman meanwhile take a look at git-repo, as suggested in this comment.

asfaltboy avatar Nov 14 '16 15:11 asfaltboy

$ go get gopkg.in/libgit2/git2go.v23
# pkg-config --cflags libgit2
pkg-config: exec: "pkg-config": executable file not found in $PATH

and error above when try to install

SilentImp avatar Aug 21 '17 19:08 SilentImp

git2go is v0.26.0 and it is expecting v0.24.0, any way that i can find a version that corresponds ?

ab9-er avatar Oct 25 '17 08:10 ab9-er

This worked but it wasn't worth the pain as merge-request is not implements.

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/8f4a9bb61df84d7c6cd0a55c5a68767d0d8ea8f1/Formula/libgit2.rb

wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz

shasum -a 256 v0.23.4.tar.gz
1b974f525b7dd10028e4473e2efce991d56e200dae5c0c7bdd98ad11e55eb879  v0.23.4.tar.gz


# edit the libgit2.rb to correct the sha to the above

brew install ./libgit2.rb
brew switch libgit2 0.23.4

# go into git-gitlab
git checkout 9a1a74a7609178f25afc1786e01c2375762de48c
# do all go gets and they work now
go get gopkg.in/libgit2/git2go.v23
go get ....
make build

This hurt.

nmccready avatar Nov 10 '17 16:11 nmccready