Yes - use curl with the RESTAPI - this works for me:
#!/bin/bash projectName=$1 repoName=$2 stashUser="username:password" stashIP="server:7990" api="http://${stashIP}/projects/${projectName}/repos" json="{\"name\": \"${repoName}\"}" curl -f -u $stashUser -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --stderr - $api -d "$json"
It returns a json block giving details of the created repo
Or else use the exceedingly good Stash Command Line Interface - a paid-for Add-on - which makes it much easier. It would be something like
stash.sh --action createRepository --project $projectName --repository $repoName
Regards,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.