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!
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.
Hi there,
The error message you’ve shared suggests that the
doctl
command doesn’t have the necessary permissions to read thespec.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.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: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 thepwd
andls
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 thedoctl
command. For example:Replace
/path/to/spec.yml
with the actual path to your file.Let me know how it goes!
Best,
Bobby