Skip to content

Commit 92f7cb2

Browse files
committed
Changelog, copyright headers, documentation
1 parent 0fafec3 commit 92f7cb2

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
1414
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
1515

1616
## [0.0.x](https://github.com/oras-project/oras-py/tree/main) (0.0.x)
17+
- Add support for authentication with ECR registries
1718
- fix 'get_manifest()' method with adding 'load_configs()' calling (0.2.33)
1819
- fix 'Provider' method signature to allow custom CA-Bundles (0.2.32)
1920
- initialize headers variable in do_request (0.2.31)

docs/getting_started/user-guide.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -678,17 +678,13 @@ More verbose output should appear.
678678

679679
> I get unauthorized when trying to login to an Amazon ECR Registry
680680
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`:
691682

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+
```
692688

693689
## Custom Clients
694690

oras/auth/ecr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
__author__ = "Vanessa Sochat"
2+
__copyright__ = "Copyright The ORAS Authors."
3+
__license__ = "Apache-2.0"
4+
15
import re
26

37
import boto3

0 commit comments

Comments
 (0)