# How to deploy web app in cumulocity by providing credentials inline

**URL:** <https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [March 31, 2023, 11:51am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400 "2023-03-31T11:51:11Z")\
**Posts on this page:** 10\
**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:** [March 31, 2023, 11:51am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/1 "2023-03-31T11:51:11Z")

</div>

#### What product/components do you use and which version/fix level are you on?

Cumulocity IOT

#### Is your question related to the free trial, or to a production (customer) instance?

Free Trial

#### What are you trying to achieve? Please describe it in detail.

Hi, I am trying to deploy the web app using c8ycli. Now I know that I can just create the build and deploy using the commands. When you run the c8ycli deploy command, it asks you for the credentials in another line. Is it possible to provide the credentials inline? like c8ycli deploy --app.tenant = someTenant --app.url = envURL --app.username = User --app.password = pass  
so that it doesnt ask for the details and verify it from the inline and directly deploy it on the provided tenant.

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [March 31, 2023, 12:06pm UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/2 "2023-03-31T12:06:41Z")

</div>

There’s nothing in the documentation that suggests this is possible, and c8ycli help says the same thing.

---

<div class="post-metadata">

**Author:** ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)\
**Post date:** [March 31, 2023, 12:53pm UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/3 "2023-03-31T12:53:47Z")

</div>

Hi Samanyu,

you can provide credentials inline by using following command options:

```auto
'-u, --url [url]',
'-U, --user [user name]',
'-P, --password [password]',

```

For example:

```auto
npx c8ycli deploy -u {{C8Y_Instance}} -U {{username}} -P {{password}}

```

best regards

---

<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:** [March 31, 2023, 1:15pm UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/4 "2023-03-31T13:15:23Z")

</div>

Hi Christian,

Thank you so much for your response.

Best 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:** [March 31, 2023, 2:00pm UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/5 "2023-03-31T14:00:16Z")

</div>

Hi Christian,

Is there an option to provide the app path as well along with all the details?

Regards,  
Samanyu

---

<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:** [March 31, 2023, 2:31pm UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/6 "2023-03-31T14:31:25Z")

</div>

You can check the help output for that command:

```auto
c8ycli deploy --help
Usage: cli deploy [options] [appPaths...]

Deploys apps from the specified paths

Options:
  -T, --tenant [tenant] Tenant
  -U, --user [user name] Username
  -P, --password [password] Password
  -s, --silent does not prompt for additional inputs
  --tag [tag] A custom tag which will be added to the package version
  -h, --help output usage information

```

So yes you can specify a local path to the built application using `appPaths`

---

<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:** [April 1, 2023, 4:16am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/7 "2023-04-01T04:16:57Z")

</div>

Hi Tristan,

Can you please provide an example for the same like npx c8ycli deploy -u {{C8Y\_Instance}} -U {{username}} -P {{password}} C:/app/projectName  
I tried this but it isn’t working also tried with --app.contextPath but no luck  
So is there any other prefix for the path or like how can I mention the path of my project root folder.

Best Regards,  
Samanyu

---

<div class="post-metadata">

**Author:** ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)\
**Post date:** [April 3, 2023, 6:19am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/8 "2023-04-03T06:19:16Z")

</div>

You can add the context path to the command without specifying a command option. For example, if your application has the context path `my-application`, you add it to the end of your command:

```auto
npx c8ycli deploy -u {{C8Y_Instance}} -U {{username}} -P {{password}} my-application

```

* * *

Christian Guether

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![sag-fast-track-service-690x88px-en-may23-v2-2](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/8/c8efb1a635636b8ea61382b461b3dac9e334f264.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<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:** [April 3, 2023, 7:05am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/9 "2023-04-03T07:05:13Z")

</div>

Hi Christian,

Thank you for your response.

Regards,  
Samanyu

---

<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:** [September 30, 2023, 7:05am UTC](https://community.cumulocity.com/t/how-to-deploy-web-app-in-cumulocity-by-providing-credentials-inline/2400/10 "2023-09-30T07:05:34Z")

</div>

Closed on September 30, 2023, 7:05am UTC

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