quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.99k stars 328 forks source link

Quarto ask for GitHub username and password when rendering or preview with command line. #10031

Open phongphuhanam opened 5 months ago

phongphuhanam commented 5 months ago

Bug description

Hello, thank you for a great work. Today I try to render the Quarto document from terminal zsh(without Vscode). Quarto then ask for GitHub login user name and password every time before it render.

However, if I render with Vscode quarto plugin, there are no issue.

Steps to reproduce

Create 'test_project'

quarto create test_project

The test_project is default from Quarto

Render documents:

cd test_project
quarto render index.qmd --to html

Expected behavior

Quarto should not ask Github login user id and pw:

quarto render index.qmd --to html

pandoc
  to: html
  output-file: /media/data/documents/test_projects/test_project/index.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  toc: true

metadata

  document-css: false
  link-citations: true
  date-format: long
  lang: en
  manuscript:
    article: index.qmd
    notebooks: []
    mecaFile: index-meca.zip
  notebook-preview-options:
    back: true
  theme: cosmo
  title-block-style: manuscript
  lightbox: auto
  comments:
    hypothesis: true
  title: ./tesst_project
  authors:
    - name: Norah Jones
      affiliation: The University
      roles: writing
      corresponding: true
  bibliography:
    - references.bib
  google-scholar: true
  toc-location: left
  clear-hidden-classes: none
  remove-hidden: all
  unroll-markdown-cells: true

Output created: _manuscript/index.html

Actual behavior

Add dummy private repository:

git remote add origin https://github.com/phongphuhanam/my-dummpy-private-repo

Render again:

 git remote -v && quarto render index.qmd --to html

origin  https://github.com/phongphuhanam/my-dummpy-private-repo (fetch)
origin  https://github.com/phongphuhanam/my-dummpy-private-repo (push)
Username for 'https://github.com': abc
Password for 'https://abc@github.com':

Your environment

Quarto check output

 quarto check                                         1 ↵
Quarto 1.4.555
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.555
      Path: /opt/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.8
      Path: /usr/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

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

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /usr/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
danieltomasz commented 5 months ago

@phongphuhanam I am not part of a dev team, but it seems that is the git that ask you for a password, not quarto , so maybe you have something misconfigured in your zsh

here you can read more how to work with private repos https://stackoverflow.com/questions/7773181/git-keeps-prompting-me-for-a-password One of possible reason is that you pointing to the repo via https not ssh or just try to properly configure your credentials (git asking you for abc account so it seems that you have something misconfigured)

if you try invoke only quarto via command line quarto render index.qmd --to html or quarto preview index.qmd --to html you shouldn't have this problem

phongphuhanam commented 5 months ago

@danieltomasz, Thank you for the suggestion. I tried the preview option but the results are similar:

 git remote -v && quarto preview index.qmd --to html                        1 ↵

origin  https://github.com/phongphuhanam/my-dummpy-private-repo (fetch)
origin  https://github.com/phongphuhanam/my-dummpy-private-repo (push)
Username for 'https://github.com':

So for now, my quick fix is to change the origin remote to some other name, and the render or preview is OK.

hanchenduming commented 5 months ago

Maybe need to install again with root user

mcanouil commented 5 months ago

You should not need to use root permission.

The one asking the credentials is Git because there is a Git operation (likely a check of some guide) that needs access to the remote which is private.

I am not 100% certain (and cannot check right now) but I don't think quarto render/preview uses Git at all.

If it works in VSCode it is because you are logged in using a GitHub account with access to the repository. "Everything" inside VSCode has access to the account credentials so the request for credentials happens but it is satisfied in this context/environment. While outside of VSCode, credentials do not exist.

cderv commented 5 months ago

@phongphuhanam did you share all the information on your example ?

My following answers will be wild guesses based the hint you shared.

The test_project is default from Quarto

I understand you ran quarto create project and selected the default type, is that so ? What is in your _quarto.yml as project type ?

 manuscript:
     article: index.qmd
     notebooks: []
     mecaFile: index-meca.zip

I am seeing this in your log, which is usually used for a Quarto Manuscript project

So it seems the project you are using and produce this problem is a Manuscript project which produce a Meca Bundle.

It happens, Quarto is using git when available to list all the files that should be included in the Meca Bundle https://github.com/quarto-dev/quarto-cli/blob/d5edb79404188308630370617c8d7a3f14d2de33/src/project/types/manuscript/manuscript-meca.ts#L151-L175

The command used is git ls-files. You could check in terminal that this commands is asking you for credentials in your specific case (because of how you git repo is configured).

You can try set meca-bundle: false in the format: manuscript configuration. This should opt-out the bundle creation, and probably not show the error you see.

It would be really appreciated if you could provide a github repo that reproduce this problem so that we can confirm this is indeed related to Manuscript, and we could think of ways to nicely fails when git is not correctly configured.

At least, we will document that git is used when available to list the file.

Hope it helps understand

phongphuhanam commented 5 months ago

@cderv Here is my source file for the test_project _quarto.yaml

project:
  type: manuscript

manuscript:
  article: index.qmd

format:
  html:
    comments:
      hypothesis: true
  docx: default
  jats: default

  # (other formats)
  # pdf: default

execute:
  freeze: true

index.qmd

---
title: ./test_project
authors:
  - name: Norah Jones
    affiliation: The University
    roles: writing
    corresponding: true
bibliography: references.bib
---

## Section
This is a simple placeholder for the manuscript's main document [@knuth84].

references.bib

@article{knuth84,
  author = {Knuth, Donald E.},
  title = {Literate Programming},
  year = {1984},
  issue_date = {May 1984},
  publisher = {Oxford University Press, Inc.},
  address = {USA},
  volume = {27},
  number = {2},
  issn = {0010-4620},
  url = {https://doi.org/10.1093/comjnl/27.2.97},
  doi = {10.1093/comjnl/27.2.97},
  journal = {Comput. J.},
  month = may,
  pages = {97–111},
  numpages = {15}
}

I believed that is the default file generate by quarto create command. One more thing is I used Quarto inside Debian docker container, so that's why git credentials are not available.

mcanouil commented 5 months ago

@phongphuhanam look at Christophe's comment, in particular the part about "meca".

cderv commented 5 months ago

Here is my source file for the test_project

So this is indeed a manuscript project as your _quarto.yml shows

project:
  type: manuscript

I believed that is the default file generate by quarto create command.

The Quarto CLI command should offer you choices when you run quarto create.

❯ quarto create
? Create
❯ project
  extension

then

? Create » project
? Type
❯ default
  website
  blog
  manuscript
  book
  confluence

So manuscript should not be the default type

One more thing is I used Quarto inside Debian docker container, so that's why git credentials are not available.

This is a setup problem - if you have git and a remote configured to an external repo, then when using git to reach some information there, it will requires credentials.

We'll try to reproduce to understand why Manuscript would require access to your git remote and if we can prevent this.

Though you could remove the remote if you don't need it in your Debian docker container. If you have it setup, probably credentiais were working at some point.

phongphuhanam commented 5 months ago

@cderv Oh, I forgot to mention the choice after the quarto create command. Until the issue is fixed, here is my quick solution.

@danieltomasz, Thank you for the suggestion. I tried the preview option but the results are similar:

 git remote -v && quarto preview index.qmd --to html                        1 ↵

origin  https://github.com/phongphuhanam/my-dummpy-private-repo (fetch)
origin  https://github.com/phongphuhanam/my-dummpy-private-repo (push)
Username for 'https://github.com':

So for now, my quick fix is to change the origin remote to some other name, and the render or preview is OK.

Fpadt commented 2 months ago

Hi, I run in the same problem

Sounds like a nice feature the manuscript .

  1. Quarto instructions for VS code work and generate the manuscript https://quarto.org/docs/manuscripts/authoring/vscode.html
    • a copy of the template in Github and (currently) public
  2. Quarto instructions for RStudio do not work https://quarto.org/docs/manuscripts/authoring/rstudio.html
    • a public copy of the template, doesn't generate and indicates the public key is ot correct (SSH)

As indicated above, after changing the git origin to a dummy public repository on github it does work

Preview does Work!!

$ git remote -v && quarto preview index.qmd --to html

output from the console:

Details

``` origin git@github.com:/MANU_R.git (fetch) origin git@github.com:/MANU_R.git (push) processing file: index.qmd output file: index.knit.md Rendering qmd embeds [1/1] notebooks/explore-earthquakes.qmd Rendering qmd embeds [index.qmd] Rendering output notebook [index.qmd] Rendering HTML preview [index.qmd] pandoc to: html output-file: 'U:\floris\GH\MANU_R\index.html' standalone: true section-divs: true html-math-method: mathjax wrap: none default-image-extension: png toc: true number-sections: true metadata document-css: false link-citations: true date-format: long lang: en manuscript: article: index.qmd notebooks: - notebook: index.qmd title: Article Notebook order: 9999 - notebook: notebooks/explore-earthquakes.qmd mecaFile: index-meca.zip notebook-preview-options: back: true theme: cosmo title-block-style: manuscript lightbox: auto comments: hypothesis: true title: La Palma Earthquakes author: - name: Steve Purves orcid: 0000-0002-0760-5497 corresponding: true email: steve@curvenote.com roles: - Investigation - Project administration - Software - Visualization affiliations: - Curvenote - name: Rowan Cockett orcid: 0000-0002-7859-8394 corresponding: false roles: [] affiliations: - Curvenote keywords: - La Palma - Earthquakes abstract: | In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ... plain-language-summary: | Earthquake data for the island of La Palma from the September 2021 eruption is found ... key-points: - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs. date: last-modified bibliography: - references.bib citation: container-title: Earth and Space Science google-scholar: true toc-location: left clear-hidden-classes: none remove-hidden: all unroll-markdown-cells: true Output created: _manuscript\index.html Preparing to preview [1/1] notebooks\explore-earthquakes.qmd Watching files for changes Browse at http://localhost:6188/ Rendering HTML preview [index.qmd] GET: / ```

Using the RENDER button in RStudio doesn't work

Using the render button in Rstudio gives the following output in the console:

Details

``` ==> quarto preview index.qmd --to html --no-watch-inputs --no-browse processing file: index.qmd output file: index.knit.md Rendering HTML preview [index.qmd] ERROR: There is an error while retrieving information from remote 'origin'. Git error: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. . Git status code: 128. Stack trace: Git error: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. . Git status code: 128. at gitHubContext (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:73307:31) at eventLoopTick (ext:core/01_core.js:153:7) at async Object.filterParams (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:95426:39) at async projectFilterParams (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:44243:45) at async filterParamsJson (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:44015:12) at async runPandoc (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:69675:24) at async renderPandoc (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:70717:26) at async pandocRenderNb (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:95026:29) at async Object.onRender (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:95069:40) at async renderFileInternal (file:///C:/Users//AppData/Local/Programs/Quarto/bin/quarto.js:78245:17) ```

Quarto Check

$ quarto check
Details

``` Quarto 1.5.57 [>] 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.57 Path: C:\Users\\AppData\Local\Programs\Quarto\bin CodePage: 1252 [>] Checking tools....................OK TinyTeX: (external install) Chromium: (not installed) [>] Checking LaTeX....................OK Using: TinyTex Path: C:\Users\\AppData\Roaming\TinyTeX\bin\windows\ Version: 2024 [>] Checking basic markdown render....OK [>] Checking Python 3 installation....(None) Unable to locate an installed version of Python 3. Install Python 3 from https://www.python.org/downloads/ [>] Checking R installation...........OK Version: 4.4.1 Path: C:/PROGRA~1/R/R-44~1.1 LibPaths: - C:/Users//AppData/Local/R/win-library/4.4 - C:/Program Files/R/R-4.4.1/library knitr: 1.48 rmarkdown: 2.28 [>] Checking Knitr engine render......OK ```

mcanouil commented 2 months ago

@Fpadt Could you properly format your post using code blocks for code and terminal outputs? Thanks. Your post is almost ineligible. If your code contains code blocks, you need to enclose it using more backticks, i.e., usually four ````. Use /details for long entry. See https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us.

philippbaessler commented 2 months ago

I ran into the same issue.

Repro steps:

  1. Create a clean quarto manuscript project:

    quarto create project manuscript . "helloworld"
  2. Initialize git, add private remote origin, commit & push

    git init
    git remote add origin <my_private_origin>
    git branch -M main
    git add --all
    git commit -m "initial commit"
    git push -uf origin main
  3. Revoke access to private remote repository

  4. Try to render the quarto project and watch it fail

    quarto render
    Error message

    ERROR: There is an error while retrieving information from remote 'origin'. Git error: git@: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. . Git status code: 128. Stack trace: Git error: git@: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Now, I understand that this error is caused by git and is in fact expected if access to the private repo is revoked. However, I actually do not at all intend to invoke git when doing quarto render. Also, following the reply of @cderv, I tried setting meca-bundle: false, like so:

manuscript:
  article: index.qmd
  meca-bundle: false
full _quarto.yml file

````yaml project: type: manuscript manuscript: article: index.qmd meca-bundle: false format: html: comments: hypothesis: true docx: default jats: default # (other formats) # pdf: default execute: freeze: true ````

But the error persists.

cderv commented 2 months ago

Did I maybe add the meca-bundle option in the wrong place?

I think this is the right place, but as we document in https://quarto.org/docs/manuscripts/components.html#meca-bundle using format: jats opt-in for the bundle anyway.

Is there a way to force quarto to render the manuscript project using just the local files in the local project directory, without invoking git?

This is what this issue is about. I need to understand what exactly is happening here related to how git is used.

To build the bundle, git ls-files command is used, and I don't know if it can avoid a remote call.

The minimul we can do is catched the git error here, and fallback to the non git mode maybe.

Fpadt commented 1 month ago

@mcanouil You are right, apologies!

I was in a hurry for a business trip and wanted to post this hoping for a solution on my return ;)
In the end, I just replicate the RStudio instructions, didn't change any code and just tried the preview feature and the RENDER button

the strange thing is that it does work in VSCode but the same not in RStudio

Tried to make it more readable, added quarto check. Hope it helps

Fpadt commented 1 month ago

Update

Searching for a workaround to use a private repository on GitHub whilst being able to render my manuscript I ran into the following:

The command I used is:

quarto preview --render all --no-watch-inputs --no-browse

it generates the manuscript which can be opened in a browser.
It seems the Render Project button does more behind the scenes, resulting in the error.

Repository

The repository I am using is PUBLIC and still throws an error using the Render Project button. It is a clone of the original template from RStudio and can be found here: manuscript-template-rstudio.

Note that the _quarto.yml only has two formats and no meca-bundle.

cderv commented 1 month ago

❌ the Render Project button in Rstudio throws an error regarding the Git permission ✔ the same command entered via he terminal does work.

That is interesting information. It would indicate this is RStudio IDE integration issue somehow if both quarto version are identical.

Render Project will do a quarto preview so be sure to try preview on the terminal.

The repository I am using is PUBLIC and still throws an error using the Render Project button. It is a clone of the original template from RStudio and can be found here: manuscript-template-rstudio.

Note that the _quarto.yml only has two formats and no meca-bundle.

we'll look into this.

nicolas-roelandt commented 1 week ago

Hi,

I do have this issue too on a project.

I thought it was something I did to the git history but it so I also replicated on another (regular) notebook and the compilation failed too. I can't use CLI (windows machine)

It was working fine a couple weeks ago then stopped (I might have updated packages, I'm not sure)

A temporary workaround can be to use website rather than manuscript in _quarto.yml

project:
  # type: manuscript
  type: website

Another workaround is to use HTTPS credentials rather SSH but it is not possible everywhere and it is very cumbersome.

Quarto version: 1.6.33 Rstudio version: 2024.09.0 & 2024.09.1 OS: Windows 10

EDIT : Add environment info and re-runned the compilation : type: website is ok, type: manuscript is KO

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Locale:
  LC_COLLATE=French_France.utf8  LC_CTYPE=French_France.utf8   
  LC_MONETARY=French_France.utf8 LC_NUMERIC=C                  
  LC_TIME=French_France.utf8    

Package version:
  backports_1.4.1    base64enc_0.1-3    base64url_1.4     
  bslib_0.5.1        cachem_1.0.8       callr_3.7.3       
  class_7.3-22       classInt_0.4-10    cli_3.6.1         
  codetools_0.2-19   colorspace_2.1-0   compiler_4.3.1    
  cpp11_0.4.7        data.table_1.15.4  DataExplorer_0.8.3
  DBI_1.2.2          digest_0.6.33      dplyr_1.1.4       
  e1071_1.7-14       ellipsis_0.3.2     evaluate_0.23     
  fansi_1.0.4        farver_2.1.1       fastmap_1.1.1     
  fontawesome_0.5.2  fs_1.6.3           generics_0.1.3    
  ggplot2_3.4.3      glue_1.6.2         graphics_4.3.1    
  grDevices_4.3.1    grid_4.3.1         gridExtra_2.3     
  gtable_0.3.3       here_1.0.1         highr_0.11        
  htmltools_0.5.7    htmlwidgets_1.6.4  igraph_2.0.3      
  isoband_0.2.7      jquerylib_0.1.4    jsonlite_1.8.7    
  KernSmooth_2.23-22 knitr_1.47         labeling_0.4.2    
  lattice_0.21.8     lifecycle_1.0.3    magrittr_2.0.3    
  maplegend_0.1.0    mapsf_0.10.1       MASS_7.3.60       
  Matrix_1.5.4.1     memoise_2.0.1      methods_4.3.1     
  mgcv_1.8.42        mime_0.12          munsell_0.5.0     
  networkD3_0.4      nlme_3.1.162       parallel_4.3.1    
  pillar_1.9.0       pkgconfig_2.0.3    plyr_1.8.9        
  png_0.1-8          processx_3.8.2     proxy_0.4-27      
  ps_1.7.5           purrr_1.0.2        R6_2.5.1          
  rappdirs_0.3.3     RColorBrewer_1.1.3 Rcpp_1.0.11       
  repr_1.1.7         reshape2_1.4.4     rlang_1.1.1       
  rmarkdown_2.27     rprojroot_2.0.3    rstudioapi_0.16.0 
  s2_1.1.6           sass_0.4.7         scales_1.2.1      
  secretbase_1.0.0   sf_1.0-15          skimr_2.1.5       
  splines_4.3.1      stats_4.3.1        stringi_1.7.12    
  stringr_1.5.0      targets_1.7.1      tibble_3.2.1      
  tidyr_1.3.0        tidyselect_1.2.0   tinytex_0.48      
  tools_4.3.1        units_0.8-5        utf8_1.2.3        
  utils_4.3.1        vctrs_0.6.5        viridisLite_0.4.2 
  withr_2.5.0        wk_0.9.1           xfun_0.45         
  yaml_2.3.7   
cderv commented 1 week ago

Thanks for sharing feedback

I can't use CLI (windows machine)

Can you give more detail on that.

nicolas-roelandt commented 1 week ago

@cderv it was not running this morning I swear, probably because CMD called an R version which did'nt have the right packages and I was not able to determine which one.

But I had another issue (completely unrelated - a conflict between xfun::is_false() and base::is_false() ) so I ended updating R to 4.4.2 and reinstalling all the env, I retried and CLI works just fine now 🥳

EDIT: it works through Rstudio to now Current environment .

R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Locale:
  LC_COLLATE=French_France.utf8  LC_CTYPE=French_France.utf8   
  LC_MONETARY=French_France.utf8 LC_NUMERIC=C                  
  LC_TIME=French_France.utf8    

Package version:
  backports_1.5.0    base64enc_0.1-3    base64url_1.4     
  bslib_0.8.0        cachem_1.1.0       callr_3.7.6       
  class_7.3-22       classInt_0.4-10    cli_3.6.3         
  codetools_0.2-20   colorspace_2.1-1   compiler_4.4.2    
  cpp11_0.5.0        data.table_1.16.2  DataExplorer_0.8.3
  DBI_1.2.3          digest_0.6.37      dplyr_1.1.4       
  e1071_1.7-16       evaluate_1.0.1     fansi_1.0.6       
  farver_2.1.2       fastmap_1.2.0      fontawesome_0.5.3 
  fs_1.6.5           generics_0.1.3     ggplot2_3.5.1     
  glue_1.8.0         graphics_4.4.2     grDevices_4.4.2   
  grid_4.4.2         gridExtra_2.3      gtable_0.3.6      
  here_1.0.1         highr_0.11         htmltools_0.5.8.1 
  htmlwidgets_1.6.4  igraph_2.1.1       isoband_0.2.7     
  jquerylib_0.1.4    jsonlite_1.8.9     KernSmooth_2.23-24
  knitr_1.49         labeling_0.4.3     lattice_0.22.6    
  lifecycle_1.0.4    magrittr_2.0.3     maplegend_0.2.0   
  mapsf_0.12.0       MASS_7.3.61        Matrix_1.7.1      
  memoise_2.0.1      methods_4.4.2      mgcv_1.9.1        
  mime_0.12          munsell_0.5.1      networkD3_0.4     
  nlme_3.1.166       parallel_4.4.2     pillar_1.9.0      
  pkgconfig_2.0.3    plyr_1.8.9         processx_3.8.4    
  proxy_0.4-27       ps_1.8.1           purrr_1.0.2       
  R6_2.5.1           rappdirs_0.3.3     RColorBrewer_1.1.3
  Rcpp_1.0.13-1      renv_1.0.11        repr_1.1.7        
  reshape2_1.4.4     rlang_1.1.4        rmarkdown_2.29    
  rprojroot_2.0.4    s2_1.1.7           sass_0.4.9        
  scales_1.3.0       secretbase_1.0.3   sf_1.0-19         
  skimr_2.1.5        splines_4.4.2      stats_4.4.2       
  stringi_1.8.4      stringr_1.5.1      targets_1.9.0     
  tibble_3.2.1       tidyr_1.3.1        tidyselect_1.2.1  
  tinytex_0.54       tools_4.4.2        units_0.8-5       
  utf8_1.2.4         utils_4.4.2        vctrs_0.6.5       
  viridisLite_0.4.2  withr_3.0.2        wk_0.9.4          
  xfun_0.49          yaml_2.3.10       
nicolas-roelandt commented 1 week ago

Did more tests this morning using the manuscript-tutorial repo,

Did several things

How to reproduce :

  1. git clone git@github.com:nicolas-roelandt/manuscript-tutorial.git
  2. cd manuscript-tutorial
  3. renv::restore()
  4. quarto render

Error message

> cd manuscript-tutorial

manuscript-tutorial>quarto render
[1/2] notebooks\explore-earthquakes.qmd

processing file: explore-earthquakes.qmd
1/7
2/7 [unnamed-chunk-1]
3/7
4/7 [unnamed-chunk-2]
5/7
6/7 [fig-spatial-plot]
7/7
output file: explore-earthquakes.knit.md

ERROR: There is an error while retrieving information from remote 'origin'.
 Git error: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
.
 Git status code: 128.

Stack trace:
 Git error: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
.
 Git status code: 128.
    at gitHubContext (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:80515:31)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async Object.filterParams (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:102623:39)
    at async projectFilterParams (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:51123:45)
    at async filterParamsJson (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:50886:12)
    at async runPandoc (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:76833:24)
    at async renderPandoc (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:78003:26)
    at async pandocRenderNb (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:102334:33)
    at async Object.onRender (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:102426:36)
    at async renderFileInternal (file:///C:/Users/roelandt/AppData/Local/Programs/Quarto/bin/quarto.js:85523:17)

manuscript-tutorial>quarto --version
1.6.33

Note : Github actions CI/CD worked when I cloned the repo 2 months ago but failed today. Possibly because of renv use, relation to current issue not obvious.

Run quarto-dev/quarto-actions/publish@v2
Run git config --global user.email "quarto-github-actions-publish@example.com"
From https://github.com/nicolas-roelandt/manuscript-tutorial
 * branch            gh-pages   -> FETCH_HEAD
 * [new branch]      gh-pages   -> origin/gh-pages
Rendering for publish:

[1/2] notebooks/explore-earthquakes.qmd
# Bootstrapping renv 1.0.11 --------------------------------------------------
- Downloading renv ... OK
- Installing renv  ... OK

- One or more packages recorded in the lockfile are not installed.
- Use `renv::status()` for more details.
Error in loadNamespace(x) : there is no package called ‘rmarkdown’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
R installation:
  Version: 4.4.2
  Path: /usr/lib/R
  LibPaths:
    - /home/runner/work/manuscript-tutorial/manuscript-tutorial/renv/library/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu
    - /home/runner/.cache/R/renv/sandbox/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/9a444a72
  knitr: (None)
  rmarkdown: (None)

The knitr package is not available in this R installation.
Install with install.packages("knitr")

The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
cderv commented 1 week ago

Thanks a lot. I'll take into account this new information when I'll look into this.