Jump to content

Credential not set for Session [vcs-2970014]


Ludovic Janssens 2

Recommended Posts

Hi,

In TDV 8.2. I am trying to add a VCS to a root folder using the appropriate CURL command from the API reference:

add root for special vcs instance

Sample: curl -X POST -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/root/{vcsInstanceName}mode={push/pull}&includePrivileges=true&rootType={type}" -H "Content-Type: application/json" -d "/users/composite/admin/gitabc"

First I got an error message stating that a session didn't exist, but when I did create a session with the SOAP interface, I got the following message: "Credential not set for this session. [vcs-2970014]"

Do you know what is lacking Other curl commands with the same cookie are failing too...

Many thanks!

Link to comment
Share on other sites

Hello Ludovic,

Try setting the credentials before attaching the the folder.

1. start session

2. create instance

3. set credential: example

curl -X POST-u admin:admin --cookie "session9400={sessionToken}" "https://localhost:9400/rest/vcs/v1/setCredential/svnQA2" -H "Content-Type:application/json" -d '{"username":"svnuser2","password":"password"}' -w %{http_code}

4. add root: example

curl-X POST-u admin:admin --cookie "session9400={sessionToken}" "https://localhost:9402/rest/vcs/v1/root/svnQA2mode=pull&includePrivileg..." -H "Content-Type:application/json" -w %{http_code} -d "/shared/examples"

Regards,

Chandrika

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...