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

Handle insecure and ports in go get #7041

Merged
merged 6 commits into from
May 27, 2019

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented May 25, 2019

If a gitea running on non-standard port is listed as the location for a go mod file, go will fail to get it as the port is not listed and for HTTP the --insecure flag is not set. This PR applies these changes.

Fixes #6985

Also fixes a similar unreported bug in url.IsExternalURL on non-standard ports.

@zeripath zeripath added this to the 1.9.0 milestone May 25, 2019
@codecov-io
Copy link

codecov-io commented May 25, 2019

Codecov Report

Merging #7041 into master will decrease coverage by <.01%.
The diff coverage is 13.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7041      +/-   ##
==========================================
- Coverage   41.46%   41.45%   -0.01%     
==========================================
  Files         442      442              
  Lines       59611    59623      +12     
==========================================
+ Hits        24715    24716       +1     
- Misses      31665    31676      +11     
  Partials     3231     3231
Impacted Files Coverage Δ
modules/context/repo.go 56.66% <0%> (-0.34%) ⬇️
modules/context/context.go 52.02% <0%> (-2.2%) ⬇️
modules/util/url.go 70.27% <100%> (+0.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ca7fcd...d2c3545. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 25, 2019
modules/context/repo.go Outdated Show resolved Hide resolved
modules/context/context.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 26, 2019
modules/util/url.go Outdated Show resolved Hide resolved
modules/util/url.go Outdated Show resolved Hide resolved
modules/util/url.go Outdated Show resolved Hide resolved
modules/util/url.go Outdated Show resolved Hide resolved
modules/util/url.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 27, 2019
@zeripath zeripath merged commit 69d81b6 into go-gitea:master May 27, 2019
@zeripath zeripath deleted the adjust-go-get-url-fix-#6985 branch May 27, 2019 21:08
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* Handle insecure and ports in go get

* Fix IsExternalURL for non-standard ports
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to go get a repository with non-80 port
5 participants