# Getting error on running c8y client cli

**URL:** <https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [February 21, 2023, 12:35pm UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271 "2023-02-21T12:35:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 21, 2023, 12:35pm UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/1 "2023-02-21T12:35:35Z")

</div>

Hi, I am using cumulocity free trial version and I was following this documentation [Getting started - Cumulocity IoT Guides](https://cumulocity.com/guides/web/gettingstarted/). I am currently getting `Error occurred while trying to proxy request /tenant/loginOptions from localhost:9000 to https://env320490.eu-latest.cumulocity.com/ (UNABLE_TO_GET_ISSUER_CERT_LOCALLY) (https://nodejs.org/api/errors.html#errors_common_system_errors) [HPM] Error occurred while trying to proxy request /tenant/currentTenant from localhost:9000 to https://env320490.eu-latest.cumulocity.com/ (UNABLE_TO_GET_ISSUER_CERT_LOCALLY) (https://nodejs.org/api/errors.html#errors_common_system_errors) [HPM] Error occurred while trying to proxy request /user/logout from localhost:9000 to https://env320490.eu-latest.cumulocity.com/ (UNABLE_TO_GET_ISSUER_CERT_LOCALLY) (https://nodejs.org/api/errors.html#errors_common_system_errors)`

this error on my terminal of vs code when I am starting the application. I am running this app on my office laptop so I think this issue might be cause of some restrictions, but I am not able to resolve this issue. Please let me know if you know anything about the same.

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [February 21, 2023, 1:45pm UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/2 "2023-02-21T13:45:57Z")

</div>

Hi Samanyu,

It seems like you are not trusting the GoDaddy CA.

You can set the `NODE_EXTRA_CA_CERTS` environment variable and point it to the CA certificate of GoDaddy.

Another **not recommended** option could be to set `NODE_TLS_REJECT_UNAUTHORIZED=0` but this **insecure** as the certificates would not be validated.

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 22, 2023, 7:08am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/4 "2023-02-22T07:08:05Z")

</div>

Hi Tristan,  
I was able to fix that error but currently i am getting issue when i am trying to deploy my application with c8y cli.

```auto
npx c8ycli deploy
prompt: Instance URL: (http://demos.cumulocity.com) https://env320490.eu-latest.cumulocity.com/
prompt: Username: (admin) NewUser2
prompt: Password: 
Create application failed:
Error: Failed to connect to https://env320490.eu-latest.cumulocity.com/. Invalid credentials provided or tenant not reachable.   
    at DeployCommand.createClient (C:\Users\samanyu.mehra\my-c8y-application\node_modules\@c8y\cli\dist\cli\DeployCommand.js:253:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DeployCommand.action (C:\Users\samanyu.mehra\my-c8y-application\node_modules\@c8y\cli\dist\cli\DeployCommand.js:72:31)

```

This is the error on my vscode terminal. I am providing the correct username and password but still getting invalid credentials error, can you tell me what the potential issue could be.

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [February 22, 2023, 8:28am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/5 "2023-02-22T08:28:58Z")

</div>

Hi Samanyu,

please try to remove the trailing “/” in the URL: [https://env320490.eu-latest.cumulocity.com](https://env320490.eu-latest.cumulocity.com)

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 22, 2023, 8:43am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/6 "2023-02-22T08:43:44Z")

</div>

Hi Stefan,  
Already tried that but same issue. My user has all the roles present in the cumulocity and I have tried changing password and using the same for deployment but no luck. Can you tell me what else I can do to make this work?

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [February 22, 2023, 8:47am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/7 "2023-02-22T08:47:36Z")

</div>

The user is case sensitive, are you using the correct casing?

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 22, 2023, 8:50am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/8 "2023-02-22T08:50:44Z")

</div>

Hi Tristan,  
Yes I have a user with the name of NewUser. Check the image attached.

 ![NewUser](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/0/8/080daec047c842ce04254e0dd2757445fbbf1add.png)  
h

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [February 22, 2023, 9:42am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/9 "2023-02-22T09:42:49Z")

</div>

Hard to do remote analysis but sometimes one of the following is the reason for that error:

- The username & password are case sensitive. (Make sure caps-lock is deactivated, copy & paste user + password etc.)
- Try to login with the user + password you are using in the browser and check if that is working.
- When browser is working but CLI not it could be because direct connections are not allowed by a corporate policy and you have to use a proxy or use a computer where direct connections are allowed. Found this: [GitHub - reubenmiller/c8ycli-fork: Fork of the @c8y/cli to add support behind corporate proxies](https://github.com/reubenmiller/c8ycli-fork) but is pretty old.
- The URL is wrong (make sure you use https://.eu-latest.cumulocity.com (copy & paste it from the browser).
- Permission admins role is sufficient (which has the application admin role).

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 22, 2023, 3:51pm UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/10 "2023-02-22T15:51:21Z")

</div>

Hi Stefan,  
I have already tried all the points you have mentioned except the 3rd one so I am currently following that. Let’s see if that’s the issue, I will update you guys here.

Regards,  
Samanyu

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 23, 2023, 4:23am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/11 "2023-02-23T04:23:26Z")

</div>

Hi,  
Is it possible to deploy the application with cli on cumulocity trial version because everything is working with other mediums except c8y cli so could this be a potential issue?

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [February 23, 2023, 6:56am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/12 "2023-02-23T06:56:18Z")

</div>

You can build the app with c8ycli build.  
Afterwards you should have a dist folder. Navigate to where the cumulocity.json file is, normally apps → {app-name} and zip everything to a zip with the app-name.  
In cumulocity you can go to Administration → Ecosystem → Applications → Add Application (Top right) → Upload App. Select the zip and you application is deployed to your tenant.

---

<div class="post-metadata">

**Author:** ![Sam123](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sam123/32/14460_2.png) [@Sam123](https://community.cumulocity.com/u/Sam123)\
**Post date:** [February 23, 2023, 7:19am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/13 "2023-02-23T07:19:48Z")

</div>

Hi Stefan,  
I know we can build from cumulocity on the browser but my issue was that I need to deploy through cumulocity cli. I tried deploying it from my personal laptop and I was able to deploy it so I think the office laptop has some restrictions regarding the credentials in cli. Anyway thanks for your help and your team.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [August 22, 2023, 7:20am UTC](https://community.cumulocity.com/t/getting-error-on-running-c8y-client-cli/4271/14 "2023-08-22T07:20:21Z")

</div>

Closed on August 22, 2023, 7:20am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
