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

unable to go get; RPC failed; HTTP 301 curl 22 The requested URL returned error: 301 #1

Closed
mewmew opened this issue Feb 14, 2017 · 5 comments

Comments

@mewmew
Copy link

mewmew commented Feb 14, 2017

u@x61s ~> go get h12.me/dfa
# cd .; git clone https://h12.me/dfa /home/u/goget/src/h12.me/dfa
Cloning into '/home/u/goget/src/h12.me/dfa'...
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
fatal: The remote end hung up unexpectedly
package h12.me/dfa: exit status 128
u@x61s ~> go get github.com/h12w/dfa
can't load package: package github.com/h12w/dfa: code in directory /home/u/goget/src/github.com/h12w/dfa expects import "h12.me/dfa"
@h12w
Copy link
Owner

h12w commented Feb 14, 2017

I've got no idea. Here is what I got and it seems OK:

$ go get -v -u h12.me/dfa
Fetching https://h12.me/dfa?go-get=1
Parsing meta tags from https://h12.me/dfa?go-get=1 (status code 200)
get "h12.me/dfa": found meta tag main.metaImport{Prefix:"h12.me/dfa", VCS:"git", RepoRoot:"https://h12.me/dfa"} at https://h12.me/dfa?go-get=1
h12.me/dfa (download)
h12.me/dfa

@mewmew
Copy link
Author

mewmew commented Feb 14, 2017

Hmm, strange.

Ran go get again with -v:

u@x61s ~> go get -v -u h12.me/dfa
Fetching https://h12.me/dfa?go-get=1
Parsing meta tags from https://h12.me/dfa?go-get=1 (status code 200)
get "h12.me/dfa": found meta tag main.metaImport{Prefix:"h12.me/dfa", VCS:"git", RepoRoot:"https://h12.me/dfa"} at https://h12.me/dfa?go-get=1
h12.me/dfa (download)
# cd .; git clone https://h12.me/dfa /home/u/goget/src/h12.me/dfa
Cloning into '/home/u/goget/src/h12.me/dfa'...
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
fatal: The remote end hung up unexpectedly
package h12.me/dfa: exit status 128

It can find the meta tag, but not git clone it seems like.

If you try changing the contents of https://h12.me/dfa?go-get=1 as follows:

 <!DOCTYPE html>
 <html lang="en">
     <head>
-		<meta name="go-import" content="h12.me/dfa git https://h12.me/dfa">
+		<meta name="go-import" content="h12.me/dfa git https://github.com/h12w/dfa">
 		<meta name="go-source" content="h12.me/dfa h12.me/dfa https://github.com/h12w/dfa/tree/master{/dir} https://github.com/h12w/dfa/blob/master{/dir}/{file}#L{line}">
     </head>
 </html>

I think it should work after the above change.

@mewmew
Copy link
Author

mewmew commented Feb 14, 2017

Really enjoyed your project 52 btw : )

@h12w
Copy link
Owner

h12w commented Feb 15, 2017

The Git proxy on h12.me is for supporting import path versioning. I have disabled the proxy for repositories (like h12.me/dfa) that do not need versions in its import path. Could you try again and tell me the result?

@mewmew
Copy link
Author

mewmew commented Feb 15, 2017

Thanks! Now it works!

u@x61s ~> go get -v h12.me/dfa
Fetching https://h12.me/dfa?go-get=1
Parsing meta tags from https://h12.me/dfa?go-get=1 (status code 200)
get "h12.me/dfa": found meta tag main.metaImport{Prefix:"h12.me/dfa", VCS:"git", RepoRoot:"https://github.com/h12w/dfa"} at https://h12.me/dfa?go-get=1
h12.me/dfa (download)
h12.me/dfa

@mewmew mewmew closed this as completed Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants