Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.85 KB

interacting-with-artifactory-jcr.md

File metadata and controls

44 lines (35 loc) · 1.85 KB

Interacting with artifactory jcr.

Setup some generic and container repositories.

For Password instead of the Password a Token should be used for authentication.

Working with Docker repositories.

For this we have setup a local Docker repository dev-container-repo and created a user with minimal at-least contribute role access for this repo.

# Push container image.
docker pull debian:latest
docker login artifactory.mydomain.com
docker tag debian:latest artifactory.mydomain.com/dev-container-repo/debian/bookworm:latest
docker push artifactory.mydomain.com/dev-container-repo/debian/bookworm:latest

# Pull container image.
docker rmi debian:latest artifactory.mydomain.com/dev-container-repo/debian/bookworm:latest
docker pull artifactory.mydomain.com/dev-container-repo/debian/bookworm:latest

Working with Generic repositories.

For this we have setup a local Generic repository generic-file-storage-repo and created a user with minimal at-least contribute role access for this repo.

Accessing artifactory using curl.

# File upload.
touch dummy-file.txt
curl -u <USER>:<PASSWORD> -T ./dummy-file.txt https://artifactory.mydomain.com/artifactory/generic-file-storage-repo/test-files/dummy-file.txt

# File download.
rm dummy-file.txt
curl -u <USER>:<PASSWORD> -L -O https://artifactory.mydomain.com/artifactory/generic-file-storage-repo/test-files/dummy-file.txt

Accessing artifactory using Jfrog CLI.

# File upload.
touch dummy-file.txt
jf rt upload ./dummy-file.txt --url=https://artifactory.mydomain.com/artifactory --user=<USER> --password=<PASSWORD> generic-file-storage-repo/test-files/dummy-file.txt

# File download.
rm dummy-file.txt
jf rt download --url=https://artifactory.mydomain.com/artifactory --user=<USER> --password=<PASSWORD> generic-file-storage-repo/test-files/dummy-file.txt