OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
815 stars 207 forks source link

How to install certificate on ubuntu without user interface? #797

Closed fhg-isi closed 7 months ago

fhg-isi commented 7 months ago

Prerequisites

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

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

fhg-isi commented 7 months ago

Related: https://github.com/OfficeDev/generator-office/issues/490

Rick-Kirkham commented 7 months ago

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.

millerds commented 7 months ago

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.