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 not working for me #8955

Closed
gopherbot opened this issue Oct 17, 2014 · 12 comments
Closed

cmd/go: go get not working for me #8955

gopherbot opened this issue Oct 17, 2014 · 12 comments

Comments

@gopherbot
Copy link

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?.
@ianlancetaylor
Copy link
Contributor

Comment 1:

What is your GOPATH environment variable set to?

Labels changed: added repo-main, release-none.

@gopherbot
Copy link
Author

Comment 2 by atbaig2002:

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

@gopherbot
Copy link
Author

Comment 3 by atbaig2002:

Can someone please help?

@ianlancetaylor
Copy link
Contributor

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?

@gopherbot
Copy link
Author

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://git@github.paypal.com/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.

@ianlancetaylor
Copy link
Contributor

Comment 6:

I get this.  Note in particular that github.paypal.com is not known.
> git clone git+ssh://git@github.paypal.com/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.

@gopherbot
Copy link
Author

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

@ianlancetaylor
Copy link
Contributor

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.

@josharian
Copy link
Contributor

Comment 9:

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

Status changed to Retracted.

@colinmegill
Copy link

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

@minux
Copy link
Member

minux commented Dec 16, 2015 via email

@colinmegill
Copy link

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

@golang golang locked and limited conversation to collaborators Dec 29, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants