Trouble with pretext deploy from the PreTeXt-CLI

80 views
Skip to first unread message

Julien

unread,
Nov 8, 2022, 9:45:13 AM11/8/22
to PreTeXt support
Hi all,

I have been transitioning to the PreTeXt-CLI on cocalc (currently version 1.0.4) and everything worked like a charm... except for the pretext deploy command.

I want to set up a GitHub page at username.github.io, so I have created a repository whose address is the following:

I have used this address when the PreTeXt-CLI asked me to paste the url,
and then I entered my username and my password.

I was told that deploy was unsuccessful with the following:

warning: There was an issue connecting to GitHub repository located at https://github.com/username/username/

This location does not make sense, whereas a few lines above, I get the message:

Attempting to connect to remote repository at `https://github.com/username/username.github.io`...

which seems to indicate it should have worked...

What have I done wrong?

Julien

PS: username is not the username I have used.

Rob Beezer

unread,
Nov 22, 2022, 1:36:33 PM11/22/22
to pretext...@googlegroups.com
Dear Julien,

Has anybody helped you with this? Or did you figure it out?

I don't have any experience with this, so if necessary, hopefully somebody else
will see what you need.

Rob

On 11/8/22 06:45, Julien wrote:
> Hi all,
>
> I have been transitioning to the PreTeXt-CLI on cocalc (currently version 1.0.4)
> and everything worked like a charm... except for the pretext deploy command.
>
> I want to set up a GitHub page at username.github.io
> <http://username.github.io/>, so I have created a repository whose address is
> the following:
> https://github.com/username/username.github.io
> <https://github.com/username/username.github.io>
>
> I have used this address when the PreTeXt-CLI asked me to paste the url,
> and then I entered my username and my password.
>
> I was told that deploy was unsuccessful with the following:
>
> warning: There was an issue connecting to GitHub repository located at
> https://github.com/username/username/ <https://github.com/username/username/>
>
> This location does not make sense, whereas a few lines above, I get the message:
>
> Attempting to connect to remote repository at
> `https://github.com/username/username.github.io`.
> <https://github.com/username/username.github.io.>..
>
> which seems to indicate it should have worked...
>
> What have I done wrong?
>
> Julien
>
> PS: username is not the username I have used.
>
> --
> 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
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/81053f90-9519-48d9-9b47-b88f7da37aa1n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/81053f90-9519-48d9-9b47-b88f7da37aa1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Julien

unread,
Nov 22, 2022, 5:19:22 PM11/22/22
to PreTeXt support
Dear Rob,

I'm still waiting for some help with this.

Let's see if this bump helps my question get answered.

Julien

Oscar Levin

unread,
Nov 23, 2022, 11:33:50 AM11/23/22
to pretext...@googlegroups.com
Hi Julien,

Sorry, your original message landed in my spam, which sometimes happens with Google groups (in Gmail...??).

We recently tried to fix an issue with parsing the username and repository name, and maybe broke it for this use case.  I can try to investigate later today, or you could try again with a different repository name.  Your project would then be at reponame.github.io.

Cheers,
Oscar.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/da99ee0c-27b7-4db8-b619-b924f61769b7n%40googlegroups.com.
Message has been deleted

Julien

unread,
Nov 24, 2022, 5:56:22 PM11/24/22
to PreTeXt support
Hi Oscar,

I am trying to do what you said.
So I created reponame set up with GitHub Pages.
Inside this repo, I have an index file showing up at the address: https://username.github.io/reponame
I am still struggling with pretext deploy.

What is the url I am supposed to paste when being asked to do so?

Thanks for your help,
Julien

PS: In case it's the the problem, I haven't already configured SSH with GitHub.

Julien

unread,
Nov 25, 2022, 1:40:14 PM11/25/22
to PreTeXt support
Hi Oscar,

Here is an update.
Since my last message, I believe I have been able to set up an SSH key for GitHub, both locally for my Mac and for my CoCalc account (hopefully this makes sense).

I still get a warning and an error, namely:

*********************************************
Attempting to connect to remote repository at `https://github.com/username/reponame`...
.....
warning: There was an issue connecting to GitHub repository located at https://github.com/github.com/username/
.....
error: Deploy was unsuccessful.
********************************************

Thanks for your help,
Julien

PS: I have just tried with the 1.0.5 version that has just been installed on CoCalc, apparently.

Oscar Levin

unread,
Nov 25, 2022, 3:45:08 PM11/25/22
to pretext...@googlegroups.com
Alright, I'm not sure exactly what the issue is with the CLI, but in the meantime I think we can get you fixed up using git so then the CLI will just work.  In the base directory of your project, in the terminal, run `git remote -v`.  Check to see if origin is the correct URL for your remote repository.  If not, then fix that using `git remote set-url origin URL` where URL is what it should be for your project.  

Then try a `git status` and then a `git push`.  You might need to fiddle with authentication stuff, but if that works, then you should be able to use `pretext deploy`.


Julien

unread,
Nov 27, 2022, 10:12:25 AM11/27/22
to PreTeXt support
Origin was correct.

'git push' did not work, I had tu use 'git push --set-upstream origin main'

Then I was asked to enter username and password.
And here is the error message I got:

*************************************************
Username for 'https://github.com': myusername
Password for 'https://myuse...@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/myusername/myreponame/'
*************************************************

I don't know what to do with this.

Thanks,
Julien

Oscar Levin

unread,
Nov 27, 2022, 10:37:59 AM11/27/22
to pretext...@googlegroups.com
Good, we are getting closer.  You will need to decide what sort of authentication you want.  If you don't have an opinion, follow the direction from that GitHub link they suggest.  Basically, instead of a password, you use the authentication key you create on GitHub, which you can store in a credential manager locally.

As soon as you get that working correctly (you can successfully do a git push) you should be able to pretext deploy.

Julien

unread,
Dec 3, 2022, 9:13:20 AM12/3/22
to PreTeXt support
The GitHub link suggested I create a token, which I did.
I then ran 'pretext deploy -u' and it looked like it went through, after I had to enter twice my username and my token as password.
In particular, I got the following message:

Latest build successfully pushed to GitHub!

But the content was not updated at username.github.io/reponame.

Oscar Levin

unread,
Dec 3, 2022, 10:14:49 AM12/3/22
to pretext...@googlegroups.com
If you navigate to your repository on GitHub, do you see your files?  I'm other words, can you see that the push to GitHub was successful?

If so, go to Settings in the GitHub repository, and select pages.  Make sure it is set to deploy from your gh-pages branch.  There you should have a link to the website.

It might just be that since you are using the username.github.io repository, the site doesn't have "reponame" after the slash.

You might also try updating pretext.  I just recently added logic to support this sort of repository name.

Julien

unread,
Dec 3, 2022, 1:38:15 PM12/3/22
to PreTeXt support
Dear Oscar,

I think I can't update pretext since I'm using cocalc.
Currently it is version 1.0.5.
I believe I have done everything I was supposed to do, including the deploy from gh-pages branch thing.
The token trick does not even work like in my previous message anymore.

I'm just gonna give up for now, this whole process is too complicated for me.
But thanks a lot for your help with this.
I'll try pretext deploy again in the future.

Regards,
Julien
Reply all
Reply to author
Forward
0 new messages