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

Provide doc and/or script to circumvent golang.org blockage in China #1558

Closed
anthonyfok opened this issue Nov 8, 2015 · 2 comments
Closed
Assignees

Comments

@anthonyfok
Copy link
Member

As reported in coderzh/gohugo.org#1 by a friend of mine in China, go get -v github.com/spf13/hugo fails to complete because golang.org, hence golang.org/x/text/transform and golang.org/x/text/unicode/norm used in hugo/helpers/path.go, are blocked in China. (Why? Beats me. Perhaps it is because golang.org is hosted on Google servers, and most Google servers are blocked in China nowadays?)

Using an overseas VPN is a way to circumvent the blockage, but thankfully, there is another way for Chinese netizens who do not have access to an overseas VPN, as suggested by Lars Seipel:

mkdir -p $GOPATH/src/golang.org/x
git clone https://github.com/golang/net $GOPATH/src/golang.org/x/net

Repeat the latter for all x repos. Do this once when setting up a new
machine for Go development, then just git pull for updates. It's maybe
not as nice as 'go get' but at least you don't need to change import
paths in other packages depending on the x repos.

(from http://grokbase.com/t/gg/golang-nuts/152cgxd8jh/go-nuts-golang-org-is-blocked-in-china)

And the good news? My friend from China tested it and reported: "This method works; a very good solution indeed."

So yes, this is a note-to-self to follow up by documenting it and probably writing a small bash script and/or MS-DOS / Windows batch file to automate the whole process, both the initial fetch and subsequent updating.

Cheers,
Anthony

@bep
Copy link
Member

bep commented Mar 1, 2017

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

@bep bep closed this as completed Mar 27, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2022
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

2 participants