File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
14
14
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
15
15
16
16
## [ 0.0.x] ( https://github.com/oras-project/oras-py/tree/main ) (0.0.x)
17
+ - Add support for authentication with ECR registries
17
18
- fix 'get_manifest()' method with adding 'load_configs()' calling (0.2.33)
18
19
- fix 'Provider' method signature to allow custom CA-Bundles (0.2.32)
19
20
- initialize headers variable in do_request (0.2.31)
Original file line number Diff line number Diff line change @@ -678,17 +678,13 @@ More verbose output should appear.
678
678
679
679
> I get unauthorized when trying to login to an Amazon ECR Registry
680
680
681
- Note that for [ Amazon ECR] ( https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html )
682
- you might need to login per the instructions at the link provided. If you look at your ` ~/.docker/config.json ` and see
683
- that there is a "credsStore" section that is populated, you might also need to comment this out
684
- while using oras-py. Oras-py currently doesn't support reading external credential stores, so you will
685
- need to comment it out, login again, and then try your request. To sanity check that you've done
686
- this correctly, you should see an "auth" key under a hostname under "auths" in this file with a base64
687
- encoded string (this is actually your username and password!) An empty dictionary there indicates that you
688
- are using a helper. Finally, it would be cool if we supported these external stores! If you
689
- want to contribute this or help think about how to do it, @vsoch would be happy to help.
690
-
681
+ You can use the ECR auth backend by setting the ` auth_backend ` to ` ecr ` :
691
682
683
+ ``` python
684
+ import oras.client
685
+ client = oras.client.OrasClient(auth_backend = " ecr" )
686
+ client.pull(target = " 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-repo:latest" )
687
+ ```
692
688
693
689
## Custom Clients
694
690
Original file line number Diff line number Diff line change
1
+ __author__ = "Vanessa Sochat"
2
+ __copyright__ = "Copyright The ORAS Authors."
3
+ __license__ = "Apache-2.0"
4
+
1
5
import re
2
6
3
7
import boto3
You can’t perform that action at this time.
0 commit comments