-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Not able to go get a repository with non-80 port #6985
Comments
OK, so even with backporting similar fixes to gitea this won't work:
This is because go get will not allow So how were you testing this? I think there's a way using go mod but if you could provide a quick example that is not working that would be very helpful for me to test this. |
So I've pushed a branch https://github.com/zeripath/gitea/tree/adjust-go-get-url-fix-%236985 but not opened a PR yet as I don't understand whether that would fix this. |
Actually I made it work this afternoon, without changing anything in the Gitea code, but had to go out before I could close this issue. I think the problem was that inside my app.ini, the DOMAIN key/property did not contain the port number, so I appended it: DOMAIN = 192.168.1.66:13000 ; port number was missing before
HTTP_PORT = 13000 I had enabled go modules before I called go get: export GO111MODULE=on Hence I did not get the malformed import path error you posted above. Appending the custom port number to the domain seemingly solved my particular issue of go getting golang modules, therefore I am not really sure either about what difference the backport would make, or what was the point modifying gogs at the first place. If you cannot think of a use case where your modification would add any value, then I am happy if you close this issue. |
Hmm so force adding a port number is likely to break other things. Are you saying that you're getting these using go modules? Ok that's interesting - do you have a minimal testcase that I can adjust to try this on? |
Are you saying that DOMAIN should not contain a port number? I don't have any testcases, but tomorrow I can write down exactly what I did step by step, if it can help. |
Setting Domain to include the port will break letsencrypt - however it will fix the |
[x]
):Description
According to the gogs issue tracker this issue has been fixed there, but apparently it is still present in gitea.
In my case gitea is running on port 13000 and trying to go get my golang package:
but got the following error:
unrecognized import path "192.168.1.66:13000/my_user_name/my_golang_repo" (parse https://192.168.1.66:13000/my_user_name/my_golang_repo?go-get=1: no go-import meta tags (meta tag 192.168.1.66/my_user_name/my_golang_repo did not match import path 192.168.1.66:13000/my_user_name/my_golang_repo))
The text was updated successfully, but these errors were encountered: