when executing the go get command to install fabric-ca, I'm getting an error - go

when executing
go get -u github.com/hyperledger/fabric-ca/cmd/
from the fabric-ca guide, I get the following error:
# cd /home/pi/go/src/github.com/hyperledger/fabric-ca; git pull --ff-only
error: cannot open .git/FETCH_HEAD: Permission denied
package github.com/hyperledger/fabric-ca/cmd: exit status 1`
I tried git cloning and it downloaded everything from the fabric-ca repository, then I tried installing fabric-server and client by myself like this:
sudo make fabric-ca-server
this also produced the following error:
Building fabric-ca-server in bin directory ...
/bin/sh: 1: go: not found
Makefile:91: recipe for target 'bin/fabric-ca-server' failed
make: *** [bin/fabric-ca-server] Error 127

Looks like your GOPATH is set to /home/pi/go and appears that you do not have access to somewhere along the path to /home/pi/go/src/github.com/hyperledger/fabric-ca.
I'd check make sure that the user you are running go get with has R/W access to /home/pi/go/src

Related

Jenkins GO run fails with git 128

Folks, am trying to run some go tests. Seems to be a failure with git configuration on the box?
Am running git version 1.8.3.1 before someone asks... go version 1.13.1
Builds pass for me locally on my mac and linux... but seem to fail in Jenkins
go test -v ./... -tags=unit
go: bitbucket.org/xxxxxxx/yyyyyyy#v1.0.82 requires
cloud.google.com/go/storage#v1.6.0 requires
cloud.google.com/go#v0.53.0 requires
cloud.google.com/go/bigquery#v1.3.0 requires
golang.org/x/exp#v0.0.0-20191030013958-a1ab85dbe136: invalid version: git fetch --unshallow -f https://go.googlesource.com/exp in /var/lib/jenkins/go/pkg/mod/cache/vcs/879ce674f4d9f0a3a3f207a6503e782bb2113f1a3d0c1f8049cc523b96d9aa9e: exit status 128:
fatal: git fetch-pack: expected shallow list
make[1]: *** [unit-test] Error 1
make[1]: Leaving directory `/var/lib/jenkins/workspace/xxxxxx/yyyyy'
make: *** [test] Error 2
Build step 'Execute shell' marked build as failure
[Slack Notifications] found #1 as previous completed, non-aborted build
[Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
Finished: FAILURE
Solution was simple, bump up the version of git in GCP

'Executable named git not found on path:' when running stack

After a recent change in the repository that I am working, I can no longer build. When trying to run any stack command, such as stack build, I get the following error:
$ stack build
Executable named git not found on path: ["/home/matthew/.stack/snapshots/x86_64-linux-nix/lts-8.23/8.0.2/bin","/nix/store/kikxl1m9gg1rh9yfi9ly9bkl39zdb6z7-postgresql-9.5.6/bin","/nix/store/xczvw3rlvr1ind8s88i7yx0vasl4gzxm-ghc-8.0.2/bin","/nix/store/sxngsdy5y53j8fkb912hbpgamb2bpv5q-patchelf-0.9/bin","/nix/store/9ngvanddznmrbf74cvy0pmrqimk3i56x-paxctl-0.9/bin","/nix/store/c07gdr6cm43j1cphadzafq185k711vx4-coreutils-8.26/bin","/nix/store/7pyzxi7k5l6nym972gi2nq8s9f9b2q0j-findutils-4.6.0/bin","/nix/store/gjwa02cchnj2r69dlqjixjmdn0ws7f1v-diffutils-3.5/bin","/nix/store/xk38vw7z7bfr8173vdwfrfamxqcaj7hi-gnused-4.4/bin","/nix/store/r6s8rcd28wsk4gwviyc93343bq5zwlqq-gnugrep-3.0/bin","/nix/store/bvs3nyfflhsb75cfn4ff2a6xnksdzx9f-gawk-4.1.3/bin","/nix/store/g3skr3kss1fqqzl5viyg178qbcp4cdky-gnutar-1.29/bin","/nix/store/kdx0bwfy20q6blpgpdb7psbn1y435r56-gzip-1.8/bin","/nix/store/f2fg211g8zy5k624dwx0g7z32cm148mr-bzip2-1.0.6.0.1-bin/bin","/nix/store/adjkz7lhgvl3y3hpkzfsmpk15f0jrnmr-gnumake-4.2.1/bin","/nix/store/lpk84rsbha199vm3k54498lqv2jswqj8-bash-4.4-p5/bin","/nix/store/1hdv6h68f7xy9k0lhxqf26saz0w0r39i-patch-2.7.5/bin","/nix/store/vkbh4xbgxvx3v9813d4kdwv8ggwrp038-xz-5.2.2-bin/bin"]
It seems that my stack program does not know the correct path to my git program.
How can I specify my git path to stack?
I have verified that I do have git installed at the following path.
$ which git
/nix/var/nix/profiles/default/bin/git
I am on nixos 17.03.
Edit.
I am sure that the stack build and which git commands were run in the same environment as they were run back to back in the same shell.
My path is
$ echo $PATH
/home/matthew/bin:/run/wrappers/bin:/run/wrappers/bin:/home/matthew/.nix-profile/bin:/home/matthew/.nix-profile/sbin:/home/matthew/.nix-profile/lib/kde4/libexec:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/nix/var/nix/profiles/default/lib/kde4/libexec:/run/current-system/sw/bin:/run/current-system/sw/sbin:/run/current-system/sw/lib/kde4/libexec
This shows the /nix/var/nix/profiles/default/bin is in the path, which contains git.
Also, in my stack.yaml file when I set system-ghc: true I get an 'access rights' error instead of the 'Executable named git not found' error.
$ stack build
Warning: /home/matthew/backup/azara_work/platform/api/stack.yaml: Unrecognized field in NixOptsMonoid: system-ghc
Cloning into '/home/matthew/backup/azara_work/platform/api/.stack-work/downloaded/4FnxEtHDACVR'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Process exited with ExitFailure 128: /nix/var/nix/profiles/default/bin/git clone --recursive git#github.com:seanhess/rollbar-haskell.git /home/matthew/backup/azara_work/platform/api/.stack-work/downloaded/4FnxEtHDACVR
Add this to either ~/.stack/config.yaml
or local stack.yaml (if it already has a nix: block)
nix:
enable: true
packages: [git]

fatal error: 'jssy.h' file not found

On macOS:
I tried to compile libipatcher with
./autogen.sh
Then I get this error:
libipatcher.cpp:17:10: fatal error: 'jssy.h' file not found #include "jssy.h"
^~~~~~~~
1 error generated.
make[1]: * [libipatcher_la-libipatcher.lo] Error 1
make: * [check-recursive] Error 1
And the developer has a jssy Xcode project where the jssy.h file is located.
How can I fix it?
jssy is in a submodule so you need to fetch it.
To do so, according to pull using git including submodule, either:
git clone --recursive https://github.com/tihmstar/libipatcher.git
or:
git submodule init; git submodule update
or use SourceTree.
Then you can attempt ./autogen.sh.

Kubernetes install gen_deepcopy permission denied

From a fresh clone of the repo, upon running make release I greeted with this error:
./hack/run-in-gopath.sh: line 33: _output/bin/deepcopy-gen: Permission denied
!!! Error in ./hack/run-in-gopath.sh:33
'"${#}"' exited with status 1
Call stack:
1: ./hack/run-in-gopath.sh:33 main(...)
Exiting with status 1
make: *** [Makefile.generated_files:201: gen_deepcopy] Error 1
A bunch of stuff changed with the build recently, so please first try 'sudo make clean' and if you still get errors, let me know.

Install external package in Google Go

I was trying to install external packages in GO language. I've found many external packages at http://godashboard.appspot.com/package.
I am working on windows system.
I tried this command to install go-router package.
goinstall go-router.googlecode.com/svn/trunk
This resulted in following error....
C:\cygwin\bin\bash.exe: === cd c:\go\src\pkg\go-router.googlecode.com\svn\trunk;
bash gomake -f- install
/cygdrive/c/go/bin/gomake: line 3: exec: make: not found
--- exit status 127
goinstall: go-router.googlecode.com/svn/trunk: install: running bash: exit status 127
I am unable to find out the reason for the error and the meaning of status code. I've read the goinstall command description but no luck..
It seems make command is missing. Make sure it's installed and that PATH variable is defined correctly.

Resources