Reputation: 19768
I'm trying to use the Stash REST API. We use SSH to authenticate.
curl -X GET -u [email protected]: --key ~/.ssh/id_rsa \
'https://stash.corp.netflix.com/rest/api/1.0/projects/MY_PROJ/repos/MY_REPO/commits'
is returning:
{"errors":[{"context":null,"message":"Authentication failed. Please check your credentials and try again.","exceptionName":null}]}
and
curl -X GET -u [email protected]: --key ~/.ssh/id_rsa \
'ssh://stash.corp.netflix.com/rest/api/1.0/projects/MY_PROJ/repos/MY_REPO/commits'
is erroring with:
curl: (1) Protocol ssh not supported or disabled in libcurl
What is the right incantation to use Stash's REST API with SSH authentication?
Upvotes: 0
Views: 4215
Reputation: 19
This work with using ~/.netrc
file with the ff format :
machine example.com
login daniel
password qwerty
refer to : https://ec.haxx.se/usingcurl/usingcurl-netrc
Upvotes: 0