`quarto publish connect` - invalid peer certificate error

Open
#10,704 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

Start by reproducing quarto publish connect --server https://myserver.com against a Connect server using the reported certificate setup, and compare its request to the working curl call for /__api__/v1/user. Done means the command accepts the certificate, prompts for the API key, and publishes successfully on the reported environments.

Written by the indexing model from the issue text.

Description

bug publishing-connect
Bug description

Received "invalid peer certificate: UnknownIssuer" error when trying to publish quarto site to connect server.

Steps to reproduce

I am encountering the same issue as #3363 trying to publish a Quarto website to our Posit Connect server. The quarto website builds successfully locally, and I can publish via the button in RStudio without issue. However, running quarto publish connect --server https://myserver.com and entering my API key results in the error:

ERROR: TypeError: error sending request for url (https://myserver.com/__api__/v1/user): error trying to connect: invalid peer certificate: UnknownIssuer

This worked when our server was http, before adding certs. When I do the curl command curl -H "Authorization: Key $API_KEY" https://myserver.com/__api__/v1/content, I get a valid response. I've also checked that my certificate for the site is Always Trusted (on Mac, done in keychain access).

Expected behavior

quarto publish connect --server https://myserver.com should prompt for an API key and then publish.

Actual behavior

quarto publish connect --server https://myserver.com and entering my API key results in the error:

ERROR: TypeError: error sending request for url (https://myserver.com/__api__/v1/user): error trying to connect: invalid peer certificate: UnknownIssuer
Your environment

Quarto: version 1.5.54
OS: macOS 14.6.1 / Darwin 23.6.0 (my coworker on Windows also reproduced this issue)
Connect version: 2024.03.0

Quarto check output
Quarto 1.5.54
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.54
      Path: /Users/mgipson1/Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.1
      Path: /Users/mgipson1/.pyenv/versions/3.10.1/bin/python3
      Jupyter: 5.7.2
      Kernels: projectname, ochco-edp-etl-venv, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/mgipson1/github-repositories/pa-knowledge-base/renv/library/macos/R-4.4/x86_64-apple-darwin20
        - /Users/mgipson1/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.4/x86_64-apple-darwin20/2edc1867
      knitr: 1.48
      rmarkdown: 2.28

[✓] Checking Knitr engine render......OK
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.