Allow pushing a manifest to a registry with self-signed TLS certificate#1952
Open
wndhydrnt wants to merge 2 commits into
Open
Allow pushing a manifest to a registry with self-signed TLS certificate#1952wndhydrnt wants to merge 2 commits into
wndhydrnt wants to merge 2 commits into
Conversation
Signed-off-by: wndhydrnt <hydrantanderwand@gmail.com>
|
Please sign your commits following these rules: $ git clone -b "fix-manifest-push-insecure-https" git@github.com:wndhydrnt/cli.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842359016240
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
Codecov Report
@@ Coverage Diff @@
## master #1952 +/- ##
=======================================
Coverage 56.72% 56.72%
=======================================
Files 310 310
Lines 21800 21800
=======================================
Hits 12367 12367
Misses 8518 8518
Partials 915 915 |
Signed-off-by: wndhydrnt <hydrantanderwand@gmail.com>
3b4a8b9 to
c02ae8f
Compare
wndhydrnt
added a commit
to imagespy/api
that referenced
this pull request
Jun 20, 2019
Cannot add a e2e test because docker/cli#1952 needs to be merged first.
hc0503
approved these changes
Nov 6, 2020
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
This change enables iterating over all available registry endpoints when pushing a manifest. Before this change, only one endpoint was used. The scheme of that endpoint was set to HTTP if the registry was marked as insecure even if the registry was available via HTTPS. This resulted in an error because a HTTP request was sent to a HTTPS endpoint.
Fixes #1951
- How I did it
The change re-uses the function
client.iterateEndpoints()that was already available. Because that function was only used for reading previously, another parameterlookupof typefunchas been added to it.lookupis used to get the endpoints to query.- How to verify it
127.0.0.1:52854.docker manifest create to create a new manifestdocker manifest push 127.0.0.1:52854/debian:stretch-slim-latest- Description for the changelog
Allow pushing a manifest to a registry with self-signed TLS certificate