You can resolve VCS packages from Remote VCS Repositories specified as supporting VCS packages.
Note
Applicable for Remote repositories.
List All Tags
Use the following command to list all tags:
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/tags/<REPOSITORY>/<USER_ORG>/<REPO>
Example:
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/tags/john-vcs-remote/jfrog/jfrog-cli
List All Branches
Use the following command to list all branches:
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/branches/<REPOSITORY>/<USER_ORG>/<REPO>Example:
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/branches/john-vcs-remote/jfrog/jfrog-cli
Download a Tag
Use the command below to download a tag. You can specify if the package will be downloaded as a tar.gz or a zip; default is tar.gz.
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/downloadTag/<REPOSITORY>/<USER_ORG>/<REPO>/<TAG_NAME>?ext=<tar.gz|zip>Example (tar.gz):
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/downloadTag/john-vcs-remote/jfrog/jfrog-cli/v3.0.0?ext=tar.gz
Download a File Within a Tag
Use the following command to download a file within a tag as a zip:
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/downloadTagFile/<REPOSITORY>/<USER_ORG>/<REPO>/<TAG_NAME>!<PATH_TO_FILE>?ext=zip
Example:
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/downloadTagFile/john-vcs-remote/jfrog/jfrog-cli/v3.0.0!README.md?ext=zip
Download a Branch
Use the command below to download a branch. You can specify a tar.gz or a zip by adding a parameter in the URL; default is tar.gz. (Downloading can be executed conditionally according to properties by specifying the properties query param. In this case only cached artifacts are searched.)
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/downloadBranch/<REPOSITORY>/<USER_ORG>/<REPO>/<BRANCH_NAME>?ext=<tar.gz|zip>[&properties=key=value]
Example (tar.gz):
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/downloadBranch/john-vcs-remote/jfrog/jfrog-cli/main?ext=tar.gz
Download a File Within a Branch
Use the following command to download a file within a branch as a zip:
curl -L -u <USERNAME>:<PASSWORD> -XGET https://[JFrogPlatformURL]/artifactory/api/vcs/downloadBranchFile/<REPOSITORY>/<USER_ORG>/<REPO>/<BRANCH_NAME>!<PATH_TO_FILE>?ext=zip
Example:
curl -L -u john:mypassword123 -XGET https://company.jfrog.io/artifactory/api/vcs/downloadBranchFile/john-vcs-remote/jfrog/jfrog-cli/main!README.md?ext=zip
Where:
<USERNAME>: Your Artifactory username (e.g., john).<PASSWORD>: Your Artifactory password or API key.[JFrogPlatformURL]: The URL of your JFrog Platform deployment (e.g., productdemo.jfrog.io).<REPOSITORY>: The VCS remote repository (e.g., john-vcs-remote).<USER_ORG>: The organization or namespace in your VCS provider (e.g., jfrog).<REPO>: The repository name (e.g., jfrog-cli).<TAG_NAME>: The tag to download (e.g., v3.0.0).<BRANCH_NAME>: The branch to download (e.g., main).<PATH_TO_FILE>: The path to a file inside a branch or tag (e.g., README.md).