Deploy Issues

37 views
Skip to first unread message

Aaron Greicius

unread,
Jan 5, 2025, 5:53:05 PM1/5/25
to PreTeXt support
I created a new pretext project with version 2.11.2 and cannot get deploy to work.  

I detail two separate issues below. You can find the repository in question at: https://github.com/agreicius/382-0. And the output of 'pretext support' is found at the bottom of this note. 

Issue 1. I believe the first issue is with pretext-tools for VS Code. When I try and run deploy from the VS Code pretext palette, I get the following message: 

Now running `python3 -m pretext deploy -u`...
PreTeXt-CLI version: 2.11.2

warning: No project.ptx manifest found in current workspace. Using global configuration specified in '~/.ptx/project.ptx'.
critical: Before you can deploy your PreTeXt project, you must be in a (sub)directory initialized with a project.ptx manifest.
critical: Move to such a directory, use `pretext new` to create a new project, or `pretext init` to update existing project for use with the CLI.


This error doesn't make much sense. There is a project.ptx manifest in the directory in question, and I am able to do other pretext commands (e.g. build and view) with the pretext palette. 

Issue 2.  The second issue has been baffling me for a number of weeks now. See my initial post here. When I attempt pretext deploy from a Terminal window from within my project directory, I get the following message: 
%%%%%%
Preparing to deploy from active `main` git branch.

Committing your latest build to the `gh-pages` branch.

Attempting to connect to remote repository at `g...@github.com:agreicius/382-0.git.`...

warning: There was an issue connecting to GitHub repository located at https://github.com/agreicius/382-0.git./

If you haven't already, configure SSH with GitHub by following instructions at:

    https://docs.github.com/en/authentication/connecting-to-github-with-ssh

Then try to deploy again.

If `g...@github.com:agreicius/382-0.git.` doesn't match your GitHub repository,

use `git remote remove origin` on the command line then try to deploy again.

%%%%%%%%

The issue remains if I use HTTPS to connect to GitHub instead of SSH. Again, the error is puzzling, as I am able to push to the GitHub repository with no problems. 

Pretext support output

PreTeXt-CLI version: 2.11.2
    PyPI link: https://pypi.org/project/pretextbook/2.11.2/
PreTeXt core resources commit: 3c662c9fc70c6fa49c031c44ffaebcfbf61ce2f1
OS: macOS-13.6.9-arm64-arm-64bit
Python version: 3.11.5, running from /opt/homebrew/opt/pyt...@3.11/bin/python3.11
Current working directory: /Users/aarongreicius/382-0
PreTeXt project path: /Users/aarongreicius/382-0

Contents of project.ptx:
------------------------
<!-- This file, the project manifest, provides the overall configuration for your PreTeXt project. To edit the content of your document, open `source/main.ptx`. See https://pretextbook.org/doc/guide/html/processing-CLI.html#cli-project-manifest. --><project ptx-version="2">
  <targets>
    <target name="web" format="html"/>
    <target name="latex" format="latex"/>
    <target name="print" format="pdf"/>
  </targets>
</project><!-- SAMPLE MANIFEST illustrating all options. Defaults are given (mostly).              --><!-- <project
        ptx-version="2"
        source="source"
        publication="publication"
        output-dir="output"
        site="site"
        stage="output/stage"
        xsl="xsl"
        asy-method="server"
     >
       <targets>
          <target
            name="web"
            format="html"
            source="main.ptx"
            publication="publication.ptx"
            output-dir="web"
            deploy-dir="interactive"
            xsl="custom-html.xsl"
            asy-method="server"
          />
          <target
            name="web-zipped"
            format="html"
            source="main.ptx"
            publication="publication.ptx"
            output-dir="web"
            compression="zip"
            asy-method="server"
          />
          <target
            name="runestone"
            format="html"
            platform="runestone"
          />
          <target
            name="print"
            format="pdf"
            source="main.ptx"
            publication="publication.ptx"
            output-dir="print"
            output-filename="mybook.pdf"
            latex-engine="pdflatex"
            deploy-dir="pdf"
          />
          <target
            name="latex"
            format="latex"
          />
          <target
            name="braille"
            format="braille"
            braille-mode="emboss"
          />
        </targets>
</project>
-->
------------------------
warning: Unable to locate the command for <mermaid> on your system.
warning: Unable to locate the command for <pdfpng> on your system.
warning: Unable to locate the command for <liblouis> on your system.

Oscar Levin

unread,
Jan 5, 2025, 9:24:39 PM1/5/25
to pretext...@googlegroups.com
Hi Aaron,

I think I know what I did to mess up on issue one.  I'll get a fix in tomorrow.

Still puzzles by the second issue.  I'll look into that some more as well.

Oscar.

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/c0943667-8fe2-4349-b7f8-ccf2954ffb2an%40googlegroups.com.

Aaron Greicius

unread,
Jan 6, 2025, 11:12:06 AM1/6/25
to pretext...@googlegroups.com
Thanks, Oscar. I figured the first issue would be something simple to do with pretext-tools. 

Regarding the second: I just successfully deployed from my iMac on campus. This suggests the issue lies somehow with how my laptop (Macbook Air) is connecting with GitHub. Interestingly, I was able to deploy to some of my other projects on the laptop. I will keep looking into things on my end and try again from home tonight. 

Aaron Greicius
Professor of Instruction
2033 Sheridan Road
Evanston, Il 60208


You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/6CV_cWj3Ud4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/CAOU9BaVQX1cjg8gNqqrjj1FtK3DWtnrvoxFOjiKR8rMQxTPKmA%40mail.gmail.com.

Charilaos Skiadas

unread,
Jan 6, 2025, 11:23:09 AM1/6/25
to pretext...@googlegroups.com
One thing to possibly examine is how VSCode was started and whether it would make a difference. At least on my mac, starting VSCode from the GUI by clicking the app icon, using spotlight or something similar, results in a different environment than if I had started it from the terminal using “code”. In the latter case the whole VSCode app, and anything that it spawns (e.g. when using the pretext-tools plugin), inherits the terminal settings, and that usually has more things set up than the GUI version. I only ever end up with this problem in the few occasions where I have to restart my computer, and the auto-restarted VSCode ends up being GUI-based. So I have to close it and restart it from the terminal. It may or may not be what’s happening on your end, but I thought I would mention it.

Charilaos Skiadas
Professor in Mathematics and Computer Science
Hanover College


Oscar Levin

unread,
Jan 6, 2025, 1:03:47 PM1/6/25
to PreTeXt support
The pretext-tools issue should now be fixed.  I had recently changed how the "current" directory was selected (which allows multiple projects to be open in the same vs code instance and have the commands still work), but forgot to add that to the deploy commands.

As for the github related issues,  I'm not sure there is anything the CLI can do to help here.  I suspect that the issues are due to how different machines are authenticated with github.  We have tried to help users set this up for a new project, and perhaps those directions are out of date.  I know that when I set up vs code to authenticate with github (to use their built-in source view, for example), it just works.

It would be nice to figure out why some methods work and other don't, so we can give advice.  I'll keep looking.

Oscar.

Aaron Greicius

unread,
Jan 6, 2025, 6:36:07 PM1/6/25
to pretext...@googlegroups.com
Thanks, Charilaos and Oscar. I am guessing that Issue 2 does indeed have something to do with how my VS Code and/or Terminal shell is authenticating with GitHub. I will try some of these suggestions tonight.  

Aaron Greicius
Professor of Instruction
2033 Sheridan Road
Evanston, Il 60208

Reply all
Reply to author
Forward
0 new messages