Using curl

How to troubleshoot Docker problems

AuthorFullName__c
Patrick Russell
articleNumber
000004145
ft:sourceType
Salesforce
FirstPublishedDate
2018-11-13T23:41:06Z
lastModifiedDate
2021-04-23
VersionNumber
7

The libcurl terminal application can run basic REST API commands such as GET or PUT options. Your Artifactory request logs will display the exact API commands your Docker client uses. You can use the one that is failing (as listed in the request.log file) or use one of these examples below to try to acquire further information on the problem being encountered, as well as possible next steps.

Basic usage (with #comments):

curl -uadmin #Artifactory-username -vvv #verbosy -k #ignore-insecure-SSL -XGET #GET-request http://localhost:8081/artifactory/api/system/ping
 

cURL uses GET requests by default. Other commands, like PUT, require the --data field, along with a (typically, JSON) data payload. Here's a sample PUT command:

curl -uadmin:password -XPUT -H"Content-type: Application/json" --data '{"name":"test-group"}' http://localhost:8081/artifactory/api/security/groups/test-group