Credential shims using the JFrog CLI to access Artifactory.
Currently supports bazel and docker via the following helpers:
bazel-credential-jfrog
docker-credential-jfrog
This internally calls the JFrog go client library to access the same stored credentials that are used by the JFrog CLI.
-
Install the
docker-credential-jfrog
binary somewhere on your$PATH
.(Note that you may need to
chmod +x
the file depending on how you fetched it) -
Add the following entry to your
~/.docker/config.json
{ [...] "credHelpers": { "<server-id>.jfrog.io": "jfrog" } }
-
Use
jf login
to get credentials to log into artifactory. -
You should now be able to run
docker pull <server.id>.jfrog.io/<repo>/<image>:<tag>
-
Install the
bazel-credential-jfrog
binary to a known location (or your$PATH
)(Note that you may need to
chmod +x
the file depending on how you fetched it) -
Add the following to your
.bazelrc
:common --credential_helper=*.jfrog.io=/path/to/bazel-credential-jfrog
-
Use
jf login
to get credentials to log into artifactory. -
Rules such as
http_archive
andhttp_file
can now access artifactory URIs.
To manually build the executables in this package, use the following commands:
go build -o docker-credential-jfrog ./cmd/docker
go build -o bazel-credential-jfrog ./cmd/bazel