Có gì mới trong 1.4.0
### Changes since v1.3.6
#### Highlights
• ORAS now uses oras-go v3 (`github.com/oras-project/oras-go/v3` v3.0.0) instead of `oras.land/oras-go/v2` (#2002)
• `oras copy` can use different credentials for the source and destination when both are on the same registry. Authentication is now cached per repository, not per registry host (fixes #1892)
• Login works again for registries whose token realm is on another private-network host, such as self-hosted GitLab. Only loopback, link-local, unspecified and cloud-metadata realm addresses are blocked by default (fixes #2260)
#### Experimental
• **Containers configuration support** (#2002). Set `ORAS_EXPERIMENTAL_CONTAINERS_CONFIG=1` and ORAS reads the container ecosystem configuration files from their default locations, as podman and buildah do. It is off by default, and nothing changes unless the variable is set.
• `registries.conf`:aliases, blocked registries, location rewrites, mirrors, `insecure`, `token-flow`, `referrers-api`, `blocked-realm-prefixes`
• `certs.d`:per-registry CA and client certificates (refs #2118)
• `auth.json`:credentials, checked after the ORAS credential store (skipped when `--registry-config` is given)
• `policy.json` and `registries.d`:pull policy with `signedBy` verification
• Command line flags such as `--plain-http`, `--insecure`, `--ca-file`, `--cert-file`/`--key-file`, `--distribution-spec` and `-u`/`-p` override the files
#### Behavior changes
• `oras blob fetch` and `oras blob delete` now require a digest reference and reject tags (#2304, fixes #2303)
• Custom header flags are now rejected for targets given with `--oci-layout-path`, `--from-oci-layout-path` or `--to-oci-layout-path`, as they already were for `--oci-layout` (#2299, fixes #2298)
• For an untagged push, `oras push --format json` no longer reports `"referenceAsTags":["<registry>/<repo>:"]`, and the go-template output no longer counts it as a tag (#2328)
#### Bug fixes
• `oras manifest fetch-config --output` works again with `/dev/stdout`, `/dev/fd/N`, FIFOs and devices. It also keeps symlinks and respects umask and the existing file's permissions (#2227, fixes #2224, #2226)
• The `ORAS_CACHE` store no longer keeps an `index.json`, so several ORAS processes can safely share one cache directory (#2329, fixes #2312)
• `--from-password`, `--to-password`, `--from-identity-token` and `--to-identity-token` now show the warning about secrets on the command line. Secrets read with `--password-stdin` and `--identity-token-stdin` now come from the command's input (#2331)
• Fix panics in the TTY progress output when a status method is called before tracking starts. `oras copy` TTY output now uses the right fetcher for successors (#2332)
• The `oras discover --output` deprecation message now names the format to use, for example `--format json` (#2297, fixes #2296)
• The authentication cache now lasts only for one command and is no longer shared across the whole process (#2306, fixes #2305)
#### Release and packaging
• The `ghcr.io/oras-project/oras` image now has OCI image labels (`org.opencontainers.image.source`, `version`, `revision`, ...), so tools such as Renovate can find the changelog (#2300)
• Snaps are released to the `stable` channel only. Pre-releases are no longer published to the snap store but are still on GitHub Releases (#2295, fixes #2294)
#### Dependencies
• `oras.land/oras-go/v2` v2.7.0 → `github.com/oras-project/oras-go/v3` v3.0.0 (#2002)
• `github.com/spf13/pflag` v1.0.10 → v1.1.0 (#2322)
• `go.yaml.in/yaml/v4` v4.0.0-rc.6 → v4.0.0 (#2307, #2318, #2323)
• `golang.org/x/sync` v0.24.0 → v0.25.0 (#2326)
• `golang.org/x/term` v0.47.0 → v0.48.0 (#2334)
• Container base images:`golang` 1.27.3-alpine (#2309) and `alpine` 3.24.4 (#2301, #2336)
• GitHub Actions and e2e test dependency updates (#2302, #2308, #2319, #2320, #2324, #2327)
#### Other
• Registry `Warning` headers are now logged with oras-go v3's `remote.NewWarningLogger` (#2317, fixes #2314)
• More unit tests for the push display handlers (#2293)
**Full changelog:** https://github.com/oras-project/oras/compare/v1.3.6...v1.4.0
## Changelog
• fdeb304ddeeb29f6cc9200457b8775908471c3ad bump:tag and release ORAS CLI v1.4.0 (#2335)
• 53d0ce90204d0593d12792a2ef794a84097ae940 build(deps):bump library/alpine from 3.24.3 to 3.24.4 (#2336)
• 821dd389ea375c155efc000d074511c639f9e288 fix:guard unstarted TTY tracking and pass fetcher to TTYCopyHandler (#2332)
• 7e2dcaf2d8602d36f36eb66cccb4029691d9f1a3 fix:warn on prefixed secret flags and read from cmd stdin (#2331)
• 2b62263133476bf102d6d3437a2e657421852834 build(deps):bump golang.org/x/term from 0.47.0 to 0.48.0 (#2334)
• 02ffd9d895cfc49b37dbc7afe663d78c92a1dae6 fix:use oci.NewStorage for the ORAS_CACHE backing store (#2329)
• 917cfd9c29a357d9d5960286e29aa1c7c800a6ce fix:report no referenceAsTags for an untagged push (#2328)
• ab1ccb2b1ead4e7cc05d31d98e0821cb7a909cf9 build(deps):bump the github-actions group across 1 directory with 4 updates (#2327)
• 5d9f7f849baf6ebc3dfc382dc5048331da0aa0c8 build(deps):bump golang.org/x/sync from 0.24.0 to 0.25.0 (#2326)
• 0f52f9a467842af2534559d609f49a0d1d140bc4 build(deps):bump github.com/spf13/pflag from 1.0.10 to 1.1.0 (#2322)
• edfaa09dc49b36ee34cd75a8e49ee708bcaec355 build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.9 to 4.0.0 in /test/e2e (#2324)
• 786e91dc7a757f2e731b23ef3bb02df1d5e98692 build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.9 to 4.0.0 (#2323)
• f11184269a32570d55db24e3f74267670488b563 build(deps):bump github.com/onsi/ginkgo/v2 from 2.33.1 to 2.34.0 in /test/e2e (#2320)
• 15f74b435b2255cc1691b52a2b11ab539146e2b6 build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.7 to 4.0.0-rc.9 in /test/e2e (#2319)
• caf3fbc7dea3f46b3b6b003fe0015a69df6407cd build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.7 to 4.0.0-rc.9 (#2318)
• f5dbbdece9bfdd474c1ad96ea618960583c215bc refactor:use remote.NewWarningLogger for registry warnings (#2317)
• 4fdee3b4cbd688dd0bd128965d4c7a0c9783d93c build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.6 to 4.0.0-rc.7 (#2307)
• efc60d22361293e2ee503d841548d7ca2f240b48 build(deps):bump go.yaml.in/yaml/v4 from 4.0.0-rc.6 to 4.0.0-rc.7 in /test/e2e (#2308)
• f2eefc8914cbfe15900c49d21c68dd0088da8e5b build(deps):bump library/golang from 1.27.2-alpine to 1.27.3-alpine (#2309)
• 3bf31fcd7aeec7fbea35b941d2d36cb007774f1c fix:allow fetch-config --output to special files (#2227)
• 19a99d19b5d0f6a7dddde66c718a4b6342ac8910 feat:migrate from oras-go v2 to v3 (#2002)
• 986ac88f44d482871da23134788d079a9400ed3c refactor:scope auth cache to command invocation (#2306)
• 1cc414e399b620c685dd502ba9accffadea46fdf test:verify push display handler calls (#2293)
• 2d47c2e947577c50df6724bdfe6823fb70dba5c3 fix:require digests for blob fetch and delete (#2304)
• b50ff6552bd3efe9ad721378a3c7f393a18e0b5f build(deps):bump the github-actions group across 1 directory with 3 updates (#2302)
• 62ac3ad498b26010e958db5e88c5cfadd4719036 build(deps):bump library/alpine from 3.24.2 to 3.24.3 (#2301)
• 4962d0fda6cd232710115b6226d6279dcb0887df feat:add oci image metadata (#2300)
• e168dfd5f7a0d792e1bb0bf0d991cb5b4505ea78 fix:reject custom header flags for an OCI layout path target (#2299)
• bc7b32ddaa0d608af82b32fda9e50d9a996632ce fix:print the format in the discover --output deprecation message (#2297)
• e84a5d31a13e8a74f917a0637de556b6a79b71c0 fix(ci):release snaps to stable only (#2295)
## Verification
Release artifacts are signed with the ORAS project release key `C6FC42F0DE84A345FAADB742F44418110791EF37`. Signatures (`.asc` files) are attached to this release.
Public keys are available in the [KEYS](https://github.com/oras-project/oras/blob/main/KEYS) file.
Release archives and the checksums file also have GitHub build provenance attestations. Verify an archive with:
```sh
gh attestation verify oras_1.4.0_linux_amd64.tar.gz --repo oras-project/oras
```
The attestations are Sigstore bundles, so they can also be downloaded with `gh attestation download` and checked with `cosign verify-blob-attestation`.