-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/vgo: 403 response from api.github.com #24085
Comments
I think this is covered by #23955? |
vgo doesn't pull releases from git, but from zip files. The local only git server isn't going to work because the tooling for that isn't ready, but is planned. For now you can use the replace directive for local modules and update the netrc file to work around the github 403 errors. |
Yes, vgo intentionally does not look in $GOPATH for your source code anymore, nor does it invoke git at all. If the import path says github, it downloads from github. The solution for your situation is to use a replace directive to point at a local directory until the code appears on github. I'm actually a little confused, though. What does your go.mod look like and where is it in the file system? |
Firstly, thank you for responding Mr. Cox, You said: "Yes, vgo intentionally does not look in $GOPATH for your source code anymore, nor does it invoke git at all." I am not particularly fond about this behaviour because for the past five years I have grown comfortable about how go just grabs everything from gopath and builds from it perfectly and so quickly. You said: "If the import path says github, it downloads from github." The way we work around this as a local repo is that there is a local git server within the lan that I connect to push commits, but it is fundamentally isolated from the golang build process. There should be no assumption that the go build tool fetches sources from a remote repo unless explicitly stated. You said: "The solution for your situation is to use a replace directive to point at a local directory until the code appears on github. I'm actually a little confused, though. What does your go.mod look like and where is it in the file system?"" As I stated elsewhere, I'm not fond of having to add new files to an existing infrastructure. The answer to your question: root@arch-io-02 2018-04-13_14:04:00_EDT : /home/dma2/Code/go/src/192.168.x.x/mfwlib
root@arch-io-02 2018-04-13_14:04:35_EDT : /home/dma2/Code/go/src/192.168.x.x/go-mfw-tool1
You could assume I have a few reuse libs looking like mfwlib. Thank you for listening. |
Change https://golang.org/cl/107657 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I have an internal git server. In it I have a package called mfwlib.
This mfwlib package only resides locally within GOPATH/src/github.com/omac777/mfwlib
but this package is not on github. I just made it look like it was locally.
when I change dir to GOPATH/src/github.com/omac777/mfwlib
and do
go build
It would build successfully without issue.
Now I try
vgo build -a -x -work
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
It should build the package successfully.
What did you see instead?
vgo: finding vbom.ml/util v0.0.0-20170409195630-256737ac55c4
vgo: 403 response from api.github.com
GitHub applies fairly small rate limits to unauthenticated users, and
you appear to be hitting them. To authenticate, please visit
https://github.com/settings/tokens and click "Generate New Token" to
create a Personal Access Token. The token only needs "public_repo"
scope, but you can add "repo" if you want to access private
repositories too.
Although vgo gives an error here, I would have expected it to go searching within my existing GOPATH for the one I have fetched using go get a while ago. I did not. I simply failed to build.
For the time being I don't want to upload my packages to github. I just want to try out vgo build with local stuff using a local set of packages residing on a local git server mixed with some other people's packages residing on github such as vbom.ml/util, but have already been fetched with go get. This "Personal Access Token" github stuff doesn't seem straightforward to configure with vgo either. In fact it seems as though vgo imposes everyone to put all their packages on github/bitbucket in order to get anything done with vgo. How can we circumvent that and use a local git server with vgo?
The text was updated successfully, but these errors were encountered: