Getting npm ERR! Permission denied (publickey) when using deploy App

I am trying to deploy a React app using the digital ocean tutorial

The tutorial uses the steps Create > Apps but deployment fails due to the following ERR in the log

2022-02-22T05:57:33.819281174Z npm ERR! Error while executing:
2022-02-22T05:57:33.819464259Z npm ERR! /usr/bin/git ls-remote -h -t ssh://
2022-02-22T05:57:33.819776780Z npm ERR! 
2022-02-22T05:57:33.820269927Z npm ERR! Warning: Permanently added the RSA host key for IP address '' to the list of known hosts.
2022-02-22T05:57:33.820583459Z npm ERR! Permission denied (publickey).
2022-02-22T05:57:33.820899093Z npm ERR! fatal: Could not read from remote repository.
2022-02-22T05:57:33.821175028Z npm ERR! 
2022-02-22T05:57:33.821661940Z npm ERR! Please make sure you have the correct access rights
2022-02-22T05:57:33.821815967Z npm ERR! and the repository exists.
2022-02-22T05:57:33.822140532Z npm ERR! 
2022-02-22T05:57:33.822437945Z npm ERR! exited with error code: 128

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @SleepingAquamarineCrab,

Check the following line:

2022-02-22T05:57:33.820583459Z npm ERR! Permission denied (publickey).

It seems like you don’t have permission to use the said git repo. You need to add your public key to the repo you are using.