Report this

What is the reason for this report?

Unable to connect to DO by Jenkins DO plugin

Posted on September 9, 2021

I defined API key (and it works if I trying to connect through curl). Also, I installed ssh keys (private and public), but still not able to connect to DO. I’m getting: “Unable to authorize you”.

Here are the logs

Sep 09, 2021 5:29:06 AM FINE com.myjeeva.digitalocean.impl.DigitalOceanClient executeHttpRequest
HTTP Request:: GET https://api.digitalocean.com/v2/droplets?page=1&per_page=10
Sep 09, 2021 5:29:07 AM FINE com.myjeeva.digitalocean.impl.DigitalOceanClient executeHttpRequest
HTTP Response Object:: HttpResponseProxy{HTTP/1.1 401 Unauthorized [Date: Thu, 09 Sep 2021 05:29:07 GMT, Content-Type: application/json, Content-Length: 64, Connection: keep-alive, x-gateway: Edge-Gateway, x-request-id: 5cbed814-f630-41a0-8b5c-3a1eef2fa692, x-response-from: Edge-Gateway, CF-Cache-Status: DYNAMIC, Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct", Set-Cookie: __cf_bm=hrih4qfxXhs3OQa6X1VIJQT2QVIyq4xwiWnFmen0dww-1631165347-0-AYC0M+sBYEqE6MF1biLfkXFiWHQStKbjtthISeH5FvrbvqyCrUFAtMiN9I5ZHGwOqQ==; path=/; expires=Thu, 09-Sep-21 05:59:07 GMT; domain=.digitalocean.com; HttpOnly; Secure; SameSite=None, Server: cloudflare, CF-RAY: 68be045b98a3daa8-ARN] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 64,Chunked: false]}}
Sep 09, 2021 5:29:07 AM FINE com.myjeeva.digitalocean.impl.DigitalOceanClient evaluateResponse
JSON Response: {"id": "Unauthorized", "message": "Unable to authenticate you" }
Sep 09, 2021 5:29:07 AM FINE com.myjeeva.digitalocean.impl.DigitalOceanClient evaluateResponse
HTTP Status Code: 401
Error Id: Unauthorized
Error Message: Unable to authenticate you

Please, help.

Jenkins v 2.309 DO plugin v 1.3.0



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

Have you also defined the auth token (authToken) in the parameters as this is needed too?

For reference check the Jenkins Docs here:

https://plugins.jenkins.io/digitalocean-plugin/

Hope that this helps! Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.