Getting error unable to authenticate you when creating a digital ocean droplet using the python script

Trying to create a droplet when already have another droplet following automated python script for endpoint installation and am getting the attached error. What could be the problem?

Hi @danoti2021! As you are new to the community, when you get a chance, please introduce yourself here.

I’d also encourage you to add a real picture as your avatar because it helps build community!

Are you following the directions here: Setup ODK-X Sync Endpoint with Cloud Services — ODK-X Docs to set up your sync-endpoint on DigitalOcean? What step in are you having trouble with? The unable to authenticate may indicate there was an issue in providing the right token or name for your droplet.

Many thanks @elmps2018
I have deleted the token and generated another one still getting the error message unable to authenticate you

This is the command am running on the console
python3 pyscript_DO.py [93825ce22f1f4f07c270b71d8b5536415452110ce0847888b577b088dd996746] [cts-catronilla] [lon1]
Much help will be appreciated

Hello Team,
Apart from running the script to create a droplet is there away to go ahead with the rest of the configuration if you already have a droplet that is able to create sync endpoint with digital ocean

Any help is needed
Many Thanks

Hello Team
Am stuck at setting up a droplet. I already has a droplet under a project but the script demands creation of a new droplet.
Which have followed the documentation and getting the error unable to authenticate you.
I have deleted the initial token generated and has now created a third one and it appears it cannot be mapped to my account. Is there away that this can be enforced?

Hello team,
Am still stuck. Getting the same error as always unable to authenticate you

Any help will highly be appreciated. Using digital ocean script

Hello Team,
If I remove the angle brackets I get error message “This size is unavailable”
What is the problem?

I think Digital Ocean changed their “Size Slug” which specifies the size of the Droplet. You can manually make your own droplet via Digital Ocean’s web ui and avoid this problem.

Here is the call the script is making.

#create a droplet with arguments passed in 
droplet = digitalocean.Droplet(token = dtoken,
								name = dname,
								image = 'ubuntu-18-04-x64',
								region = dregion,
								size_slug = "4gb",
								user_data = scripttext,
								backups = False)

The important parts are:

  1. use the Ubuntu image
  2. use cloud_init_DO.yml file to configure your Droplet. The cloud config file makes sure all the necessary software gets installed.
1 Like

Many thanks @W_Brunette
Is there away I can run the config file cloud_init_DO.yml from the console rather than opening the files and manually installing one by one.

Great thanks

1 Like

I found this older article that says put the contents of the file in the “User Data” section.

The user data option still exists in the creation UI.

EDIT: See also How to Provide User Data During Droplet Creation :: DigitalOcean Documentation

1 Like

Hello Team,
This installation is frustrating me. Why can’t it be like following the link Setup ODK-X Sync Endpoint with Cloud Services — ODK-X Docs and its done

This is what I have done.
I have a droplet
followed the link
2. Open a terminal or command line. Install module to manage DigitalOcean droplets, using command:

$ pip3 install -U python-digitalocean

This is where am stuck
The guide should be explicit that one is directed when an error is countered.

Whoever has gone through this successfully.Please direct

Hello Team,
Anyone with an idea how I can go about this. Can I write to digital ocean?

Best regards

@danoti2021 as I stated in the post above that Digital Ocean has changed their size slug and possibly other things in the interface. Someone needs to update our python script for it to work to the newer Digital Oceans definitions. NOTE: for the Azure and AWS we moved away from scripts because of this problem of changing APIs.

You can create a droplet manually by

  1. Select an Ubuntu-18-04 droplet
  2. Copy and paste the config file cloud_init_DO.yml in the “User Data” section. From Digital Ocean’s Documentation
    When creating a Droplet via the Digital Ocean Control Panel, you may check the User data box in the Select additional options section to supply user data. Paste your user data into the form that appears, then select any remaining settings or options for your Droplet.

Do you get an error if you create it manually through the Digital Ocean control panel?

1 Like