Question

doctl create app returns account no access to repo

I’m trying to create an app via doctl doctl app create --spec .do/app.yaml but it gives me this error

Error: POST https://api.digitalocean.com/v2/apps: 400 (request “304ba4d8-b2c3-439d-8b7f-2d7f9b14a01a”) Account does not have access to the repo

I verified the doctl account I’m at via doctl auth list and verified also that the personal access token attached to auth is working as I used it to connect to digitalocean API.

Unto the Digitalocean app platform, I can browse the repo and create the app as well. Any help?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
September 8, 2023

Hi there,

The error you’re encountering indicates that DigitalOcean App Platform does not have the necessary permissions to access the repository you specified in your .do/app.yaml file rather than the doctl command not having access to your DigitalOcean account.

Sometimes, the connection between DigitalOcean and your version control system (like GitHub or GitLab) might need to be refreshed. What you could do is:

-   Navigate to DigitalOcean's control panel and the App Platform section.
-   Disconnect and then reconnect your GitHub or GitLab account.
-   Then try your `doctl` command again.

If this does not help, I could also suggest the following:

  1. Verify Repository Access:

    • Ensure the repository URL specified in the .do/app.yaml file is correct.
    • If you’re using a private repository, make sure DigitalOcean has been granted access to it.
  2. GitHub Access: If your repository is hosted on GitHub:

    • Go to your GitHub account settings.
    • Navigate to “Applications” and then select “Authorized OAuth Apps”.
    • Find DigitalOcean in the list and ensure the necessary repository permissions are granted.
  3. GitLab Access: If your repository is hosted on GitLab:

    • Go to your GitLab account settings.
    • Navigate to “Applications”.
    • Ensure that DigitalOcean has the necessary repository permissions.

You could also try using the latest version of doctl by running doctl update. Sometimes, bugs or issues are fixed in newer releases.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel