Go: cmd/go: go get not working for me

Created on 18 Oct 2014  ·  12Comments  ·  Source: golang/go

by atbaig2002:

go get github.paypal.com/AccountBase/restcryptoserv.git
# cd .; git clone github.paypal.com/AccountBase/restcryptoserv
/x/home/abaig/go/src/github.paypal.com/AccountBase/restcryptoserv.git
fatal: Could not switch to 'github.paypal.com/AccountBase': No such file or directory
package github.paypal.com/AccountBase/restcryptoserv.git: exit status 128

How do I force go get to use https?.
FrozenDueToAge

Most helpful comment

@minux Apologies - will do - though it may save you questions elsewhere to annotate this with the solution this person found.

All 12 comments

Comment 1:

What is your GOPATH environment variable set to?

_Labels changed: added repo-main, release-none._

Comment 2 by atbaig2002:

Here it is 
echo $GOPATH
/x/home/abaig/go

Comment 3 by atbaig2002:

Can someone please help?

Comment 4:

I tried it.  It doesn't work for me either.  As far as I can tell, there is no website
github.paypal.com.  Can you show the "git clone" command that works for you?

Comment 5 by atbaig2002:

Here is the output from
1. git clone
2. go get
3. git clone git+ssh://git@
Please note that (3) works fine. the others don't work.
-bash-4.1$ git clone github.paypal.com/AccountBase/restcryptoserv.git
fatal: Could not switch to 'github.paypal.com/AccountBase': No such file or directory
-bash-4.1$
-bash-4.1$
-bash-4.1$ go get github.paypal.com/AccountBase/restcryptoserv.git
# cd .; git clone github.paypal.com/AccountBase/restcryptoserv
/x/home/abaig/go/src/github.paypal.com/AccountBase/restcryptoserv.git
fatal: Could not switch to 'github.paypal.com/AccountBase': No such file or directory
package github.paypal.com/AccountBase/restcryptoserv.git: exit status 128
-bash-4.1$
-bash-4.1$
-bash-4.1$  git clone git+ssh://[email protected]/AccountBase/restcryptoserv.git
Initialized empty Git repository in
/x/home/abaig/go/src/github.paypal.com/AccountBase/restcryptoserv/.git/
remote: Counting objects: 704, done.
remote: Compressing objects: 100% (415/415), done.
remote: Total 704 (delta 266), reused 666 (delta 232)
Receiving objects: 100% (704/704), 493.11 KiB, done.
Resolving deltas: 100% (266/266), done.

Comment 6:

I get this.  Note in particular that github.paypal.com is not known.
> git clone git+ssh://[email protected]/AccountBase/restcryptoserv.git
Cloning into 'restcryptoserv'...
ssh: Could not resolve hostname github.paypal.com: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
In any case, however it works for you, you are using ssh, and it looks like it won't
work without using ssh.  The "go get" command does not support import paths that use
ssh.  I don't know of any plans to support it.
You can still use everything other than "go get" by manually cloning the repository into
$GOPATH/src/github.paypal.com/AccountBase/restcryptoserv.  Import statements from other
packages will still work.

Comment 7 by atbaig2002:

Okay Thanks. Here is what is puzzling me 
got get github.paypal.com/AccountBase/restcryptoserv.git on colleague's machine 
prompts his for the https username and password and on my machine it just fails with the
error above.
FYI: github.paypal.com is an internal repo accessible from only corporate network

Comment 8:

Use "go get -x" to see the exact commands that are being run.  That may help clarify the
difference between your machine and your colleague's.

Comment 9:

I followed up with atbaig2002 about this offline. It was user error.

_Status changed to Retracted._

@gopherbot @josharian @ianlancetaylor I just hit this - what was the user error?

Please do not ask questions on closed issues.
Please see https://golang.org/wiki/Questions
for where to ask questions. Thanks.

@minux Apologies - will do - though it may save you questions elsewhere to annotate this with the solution this person found.

Was this page helpful?
0 / 5 - 0 ratings