OfficeDev/generator-office

How to install certificate on ubuntu without user interface?

fhg-isi opened this issue · 3 comments

Prerequisites

Please answer the following questions before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [x ] I am running the latest version of Node and the tools
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected behavior

If I start an add in with
npm run start
on ubuntu I would not expect any error.

Current behavior

I get

root@0a1994d47eb5:~/excel_add_in# npm run start

excel_add_in@0.0.1 start
office-addin-debugging start manifest.xml

Debugging is being started...
App type: desktop
The developer certificates have been generated in /root/.office-addin-dev-certs
Installing CA certificate "Developer CA for Microsoft Office Add-ins"...
Unable to start the dev server. Error: Unable to install the CA certificate. /bin/sh: line 1: sudo: command not found

Sideloading the Office Add-in...
Error: Unable to start debugging.
Error: Unable to sideload the Office Add-in.
Error: Platform not supported: linux.

=>Pleases support ubuntu or document the system requirements in the readme at

https://github.com/OfficeDev/generator-office

I expected that I could start the add inside some ubuntu docker container and connect to it from a windows laptop.

I start my container with

docker run -it -p {ip of server}:3000:3000 --name excel-addin excel-addin

Related: #490

This is expected. There is no desktop version of the Office Suite for linux, only Windows and Mac. To develop on Linux you have to sideload manually to Office on the Web. See Debug on Linux.

There are multiple things going on here. One is that there aren't any office apps on linux so it's not supported. But as far at the certificates go (referenced in the title of the issue) . . . setting up certs depends on the OS environment commands to do so and they require admin privileges which is why "sudo" is being used in this case and generally admin operations requires a prompt. This is controlled by a sh script in the office-addin-scripts repo. If you have a way to script setting up certs in a way that fits your needs, feel free to submit a PR there and we'll consider it.