oras-project / oras-go

ORAS Go library
https://oras.land
Apache License 2.0
177 stars 94 forks source link

types.AuthConfig is deprecated in docker v25.x.x #691

Closed yp05327 closed 8 months ago

yp05327 commented 8 months ago

When I build my application, I got this error:

# oras.land/oras-go/pkg/auth/docker
/go/pkg/mod/oras.land/oras-go@v1.2.4/pkg/auth/docker/login_tls.go:44:20: undefined: types.AuthConfig
/go/pkg/mod/oras.land/oras-go@v1.2.4/pkg/auth/docker/login_tls.go:62:131: undefined: types.AuthConfig
/go/pkg/mod/oras.land/oras-go@v1.2.4/pkg/auth/docker/login_tls.go:122:32: undefined: types.AuthConfig
/go/pkg/mod/oras.land/oras-go@v1.2.4/pkg/auth/docker/login.go:54:16: undefined: types.AuthConfig

Then I found that types.AuthConfig is deprecated in github.com/docker/docker@v25.x.x. https://pkg.go.dev/github.com/docker/docker@v24.0.7+incompatible/api/types#AuthConfig

But github.com/docker/docker was updated from v24.0.7 to v25.0.0 in #689 yesterday.

Wwwsylvia commented 8 months ago

Hi @yp05327 , it looks like your code is still using v1.2.4which does not include the latest dependency updates. To use the latest commit 2afb6872ee1aefbdb5bfdbdaa15833cad8244b80, you can run:

go get oras.land/oras-go@2afb6872ee1aefbdb5bfdbdaa15833cad8244b80
yp05327 commented 8 months ago

Hi @Wwwsylvia, it worked. Thanks a lot.