I am following the tutorial which uses digitalocean server to deploy a simple app. So I created an account here for this process, generated the token, installed cli and running these commands:
$ doctl auth init
Using token for context default
Validating token... ✔
then:
doctl apps create --spec spec.yml
and here is the spec.yml file:
name: demo
region: fra
services:
- name: demo
dockerfile_path: Dockerfile
source_dir: .
github:
deploy_on_push: true
repo: myname/demo
health_check:
http_path: /my-working-endpoint
http_port: 8080
instance_count: 1
instance_size_slug: basic-xxs
routes:
- path: /
so here is what I see"
Error: opening app spec: open spec.yml: permission denied
what does it mean? Permission for what? The file itself, or it cannot connect to github or digitalocean. It is not clear what is wrong here
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!
Hi there,
The error message you’ve shared suggests that the doctl command doesn’t have the necessary permissions to read the spec.yml file on your local machine.
This is not an issue with connecting to GitHub or DigitalOcean; rather, it’s about file access permissions on your system.
To verify if this is indeed the case, check the permissions of the spec.yml file to see if your user has read access to it.
ls -l spec.yml
The output will show the permissions on the left side.
If the permissions are restrictive (e.g., -rw-------), you might need to change them to allow your user to read the file. You can grant read permission to the file with the following command:
chmod +r spec.yml
Besides that, the error can also occur if the spec.yaml file is not in your current directory. If you’re in a different directory, doctl won’t be able to find and access the file. Use the pwd and ls commands to confirm your current directory and the files within it.
If the issue persists, try using the absolute path to the spec.yml file when running the doctl command. For example:
doctl apps create --spec /path/to/spec.yml
Replace /path/to/spec.yml with the actual path to your file.
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.