ARTIFACTORY: How to proxy a Github repo

ARTIFACTORY: How to proxy a Github repo

AuthorFullName__c
Sara Ngo
articleNumber
000006254
ft:sourceType
Salesforce
FirstPublishedDate
2024-12-05T09:13:49Z
lastModifiedDate
2024-12-04
VersionNumber
2
Introduction 
If you need to proxy a public GitHub repository and download its content via Artifactory, follow these steps

1. Create a VCS Remote Repository that points to https://github.com/.

    • Provide a name for the repository (e.g., demo-vcs).
    • Configure authentication if required for private repositories.
2. Fetch Files from the Target Repository
To fetch content from the repository on GitHub, for example kyuni22/pybbg (https://github.com/kyuni22/pybbg/tree/master), we’ll use the Download a VCS Branch REST API endpoint.
Here’s an example curl command to download the master branch:
curl -uadmin:password \
'https://JFROG_URL/artifactory/api/vcs/downloadBranch/demo-vcs/kyuni22/pybbg/master' \
-o pybbg.tar.gz

 

 

3. Verify the Download
After running the command, verify that the content is downloaded successfully in the specified output file:
 tar -xvf pybbg.tar.gz
x pybbg-master/
x pybbg-master/.gitignore
x pybbg-master/BBG_API_test.ipynb
x pybbg-master/README.md
x pybbg-master/pybbg/
x pybbg-master/pybbg/__init__.py
x pybbg-master/pybbg/pybbg_k.py
x pybbg-master/setup.py
x pybbg-master/test_pybbg.py


ls pybbg-master
BBG_API_test.ipynb pybbg              test_pybbg.py
README.md          setup.py

4. Additional Information
For more details on using the VCS APIs and additional options, refer to the VSC REST APIs documentation (https://jfrog.com/help/r/jfrog-rest-apis/get-vcs-tags