-
-
Notifications
You must be signed in to change notification settings - Fork 121
Description
I'm trying to deploy my hexo site to GitHub Pages. Right now I'm testing my setup locally, but I intend to use a CI setup once it works (probably using GitHub actions).
Based on the README, I included this block in my _config.yml
:
deploy:
type: git
repo: https://github.com/<myusername>/<myrepo>.git
branch: gh-pages
token: $GITHUB_TOKEN
name: <my "visible" name>
email: <my email>
I created an access token in GitHub with the repo scope. Now I run the deployment from the command line to test it:
GITHUB_TOKEN=<my token> hexo deploy
The site is generated and I see git messages when everything is added to the new local repo. After this, I see a prompt:
Username for 'https://github.com':
Why does this come up? Who is supposed to enter this username in a CI scenario? My local system is not configured to remember an HTTPS GitHub username, since I normally use SSH. But the CI system would obviously never know this username - how do I specify it?
(I tried using the name
setting in the config file as a test, but that doesn't work - looking at the code, it's clearly not intended for that purpose.)
I confirmed that if I enter the username manually, the password prompt appears next. At this point I have to enter the token again and everything works - but it appears that the token configuration in the config file is ignored entirely.
I'm sure I'm misunderstanding something... can anybody confirm that token deployment is supposed to work for my use case?