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

Fix IndexUrl to point to right url #194

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

nirmoy
Copy link
Contributor

@nirmoy nirmoy commented Jun 1, 2019

krew update fails with:
fatal: repository 'https://sigs.k8s.io/krew-index.git/'
not found\n": exit status 128

krew update fails with:
fatal: repository 'https://sigs.k8s.io/krew-index.git/'
not found\n": exit status 128

Signed-off-by: Nirmoy Das <ndas@suse.de>
@k8s-ci-robot
Copy link
Contributor

Welcome @nirmoy!

It looks like this is your first PR to kubernetes-sigs/krew 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/krew has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 1, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 1, 2019
@codecov-io
Copy link

codecov-io commented Jun 1, 2019

Codecov Report

Merging #194 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #194   +/-   ##
=======================================
  Coverage   53.77%   53.77%           
=======================================
  Files          13       13           
  Lines         716      716           
=======================================
  Hits          385      385           
  Misses        279      279           
  Partials       52       52

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 52cbf1e...ec7e3bb. Read the comment docs.

@corneliusweig
Copy link
Contributor

Hi, thanks for reporting this! This is definitely a viable workaround. However, I think there's an infrastructure problem going on beneath. If I run git with debugging enabled ( GIT_TRACE=1 GIT_TRACE_CURL=1 GIT_TRACE_CURL_NO_DATA=1 git clone --depth 1 --branch master https://sigs.k8s.io/krew-index), I get the following:

13:12:16.274658 git.c:419               trace: built-in: git clone --depth 1 --branch master https://sigs.k8s.io/krew-index
Cloning into 'krew-index'...
13:12:16.310718 run-command.c:643       trace: run_command: git-remote-https origin https://sigs.k8s.io/krew-index
13:12:16.327607 http.c:728              == Info: Couldn't find host sigs.k8s.io in the .netrc file; using defaults
13:12:16.364255 http.c:728              == Info:   Trying 35.201.71.162...
13:12:16.364322 http.c:728              == Info: TCP_NODELAY set
13:12:16.393980 http.c:728              == Info: Connected to sigs.k8s.io (35.201.71.162) port 443 (#0)
13:12:16.394768 http.c:728              == Info: ALPN, offering http/1.1
13:12:16.395134 http.c:728              == Info: Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
13:12:16.422306 http.c:728              == Info: successfully set certificate verify locations:
13:12:16.422356 http.c:728              == Info:   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
[[more TLS stuff]]
13:12:16.492847 http.c:728              == Info:  SSL certificate verify ok.
13:12:16.493029 http.c:675              => Send header, 0000000226 bytes (0x000000e2)
13:12:16.493060 http.c:687              => Send header: GET /krew-index/info/refs?service=git-upload-pack HTTP/1.1
13:12:16.493068 http.c:687              => Send header: Host: sigs.k8s.io
13:12:16.493075 http.c:687              => Send header: User-Agent: git/2.21.0
13:12:16.493082 http.c:687              => Send header: Accept: */*
13:12:16.493089 http.c:687              => Send header: Accept-Encoding: deflate, gzip
13:12:16.493098 http.c:687              => Send header: Accept-Language: en-US, *;q=0.9
13:12:16.493105 http.c:687              => Send header: Pragma: no-cache
13:12:16.493121 http.c:687              => Send header: Git-Protocol: version=2
13:12:16.493129 http.c:687              => Send header:
13:12:16.639244 http.c:675              <= Recv header, 0000000032 bytes (0x00000020)
13:12:16.639302 http.c:687              <= Recv header: HTTP/1.1 301 Moved Permanently
13:12:16.639328 http.c:675              <= Recv header, 0000000022 bytes (0x00000016)
13:12:16.639343 http.c:687              <= Recv header: Server: nginx/1.10.3
13:12:16.639359 http.c:675              <= Recv header, 0000000037 bytes (0x00000025)
13:12:16.639376 http.c:687              <= Recv header: Date: Sat, 01 Jun 2019 11:12:16 GMT
13:12:16.639395 http.c:675              <= Recv header, 0000000025 bytes (0x00000019)
13:12:16.639408 http.c:687              <= Recv header: Content-Type: text/html
13:12:16.639447 http.c:675              <= Recv header, 0000000021 bytes (0x00000015)
13:12:16.639470 http.c:687              <= Recv header: Content-Length: 185
13:12:16.639496 http.c:675              <= Recv header, 0000000079 bytes (0x0000004f)
13:12:16.639521 http.c:687              <= Recv header: Location: https://github.com/kubernetes-sigs/krew-index/blob/master/info/refs
13:12:16.639543 http.c:675              <= Recv header, 0000000017 bytes (0x00000011)
13:12:16.639578 http.c:687              <= Recv header: Via: 1.1 google
13:12:16.639600 http.c:675              <= Recv header, 0000000016 bytes (0x00000010)
13:12:16.640005 http.c:687              <= Recv header: Alt-Svc: clear
13:12:16.640033 http.c:675              <= Recv header, 0000000002 bytes (0x00000002)
13:12:16.640074 http.c:687              <= Recv header:
13:12:16.640096 http.c:728              == Info: Ignoring the response-body
13:12:16.640163 http.c:728              == Info: Connection #0 to host sigs.k8s.io left intact
13:12:16.640247 http.c:728              == Info: Issue another request to this URL: 'https://github.com/kubernetes-sigs/krew-index/blob/master/info/refs'
13:12:16.640662 http.c:728              == Info: Couldn't find host github.com in the .netrc file; using defaults
13:12:16.644016 http.c:728              == Info:   Trying 140.82.118.4...
13:12:16.644061 http.c:728              == Info: TCP_NODELAY set
13:12:16.696750 http.c:728              == Info: Connected to github.com (140.82.118.4) port 443 (#1)
13:12:16.697221 http.c:728              == Info: ALPN, offering http/1.1
13:12:16.697621 http.c:728              == Info: Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
13:12:16.724233 http.c:728              == Info: successfully set certificate verify locations:
13:12:16.724284 http.c:728              == Info:   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
[[more TLS stuff]]
13:12:16.844793 http.c:728              == Info:  SSL certificate verify ok.
13:12:16.845028 http.c:675              => Send header, 0000000229 bytes (0x000000e5)
13:12:16.845065 http.c:687              => Send header: GET /kubernetes-sigs/krew-index/blob/master/info/refs HTTP/1.1
13:12:16.845078 http.c:687              => Send header: Host: github.com
13:12:16.845115 http.c:687              => Send header: User-Agent: git/2.21.0
13:12:16.845145 http.c:687              => Send header: Accept: */*
13:12:16.845169 http.c:687              => Send header: Accept-Encoding: deflate, gzip
13:12:16.845191 http.c:687              => Send header: Accept-Language: en-US, *;q=0.9
13:12:16.845209 http.c:687              => Send header: Pragma: no-cache
13:12:16.845223 http.c:687              => Send header: Git-Protocol: version=2
13:12:16.845239 http.c:687              => Send header:
13:12:16.899238 http.c:728              == Info: HTTP 1.0, assume close after body
13:12:16.899352 http.c:675              <= Recv header, 0000000024 bytes (0x00000018)
13:12:16.899396 http.c:687              <= Recv header: HTTP/1.0 403 Forbidden
13:12:16.899471 http.c:675              <= Recv header, 0000000025 bytes (0x00000019)
13:12:16.899531 http.c:687              <= Recv header: Cache-Control: no-cache
13:12:16.899609 http.c:675              <= Recv header, 0000000019 bytes (0x00000013)
13:12:16.899676 http.c:687              <= Recv header: Connection: close
13:12:16.899730 http.c:675              <= Recv header, 0000000026 bytes (0x0000001a)
13:12:16.899763 http.c:687              <= Recv header: Content-Type: text/plain
13:12:16.899786 http.c:675              <= Recv header, 0000000002 bytes (0x00000002)
13:12:16.899846 http.c:687              <= Recv header:
13:12:16.900121 http.c:728              == Info: TLSv1.2 (IN), TLS alert, close notify (256):
13:12:16.900188 http.c:728              == Info: Closing connection 1
13:12:16.900326 http.c:728              == Info: TLSv1.2 (OUT), TLS alert, close notify (256):
remote: Please upgrade your git client.
remote: github.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days
fatal: unable to access 'https://sigs.k8s.io/krew-index/': The requested URL returned error: 403

So the important thing is that GET sigs.k8s.io/krew-index/info/refs is redirecting to https://github.com/kubernetes-sigs/krew-index/blob/master/info/refs (note the blob/master). When git tries to work with this URI github answers with 403.

Does anyone know if the forwarding to github.com/kubernetes-sigs/krew-index/blob/master is necessary and intentional? Or could the redirect also be to github.com/kubernetes-sigs/krew-index, which should work, I guess. (Could it have something to do with go modules?)

@ahmetb
Copy link
Member

ahmetb commented Jun 1, 2019

We shouldn’t use sigs.k8s.io for this yet. Let’s revert back to GitHub.

@ahmetb
Copy link
Member

ahmetb commented Jun 2, 2019

@nirmoy how did you hit this problem? I don't think we have a release of krew with the sigs.k8s.io url hardcoded in it. Did you build from master?

@ahmetb ahmetb self-assigned this Jun 2, 2019
@nirmoy
Copy link
Contributor Author

nirmoy commented Jun 3, 2019

@nirmoy how did you hit this problem? I don't think we have a release of krew with the sigs.k8s.io url hardcoded in it. Did you build from master?

Yes I had this problem and I build krew from master.

@ahmetb
Copy link
Member

ahmetb commented Jun 3, 2019

Yes I had this problem and I build krew from master.

OK, this makes sense!

/lgtm
/approve

Feel free to open a new issue if you think we should actually change the index URI. I feel like GitHub URLs are more permanent, reliable and faster than k8s.io URLs for this task.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 3, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, nirmoy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 3, 2019
@k8s-ci-robot k8s-ci-robot merged commit 6597914 into kubernetes-sigs:master Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants