Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy to github even though I have personal token in the _config.yml #4757

Closed
5 tasks done
masterrite opened this issue Aug 18, 2021 · 7 comments
Closed
5 tasks done
Labels

Comments

@masterrite
Copy link

masterrite commented Aug 18, 2021

Check List

Please check followings before submitting a new issue.

Question

I'm using the latest version of hexo-deployer-git but I can't access my repo. Here's the error:

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/*****.github.io/': The requested URL returned error: 403
FATAL { err:
   { Error: Spawn failed
       at ChildProcess.<anonymous> (F:\Hexo\node_modules\hexo-util\lib\spawn.js:52:19)
       at ChildProcess.emit (events.js:198:13)
       at ChildProcess.cp.emit (F:\Hexo\node_modules\cross-spawn\lib\enoent.js:40:29)
       at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) code: 128 } } 'Something\'s wrong. Maybe you can find the solution here: %s' 'https://hexo.io/docs/troubleshooting.html'

Environment & Settings

Node.js & npm version

hexo: 5.4.0
hexo-cli: 4.3.0
os: win32 10.0.19043
http_parser: 2.9.3
node: 10.22.0
v8: 6.8.275.32-node.58
uv: 1.34.2
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.41.0
napi: 6
openssl: 1.1.1g
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019c

Your site _config.yml (Optional)

Your theme _config.yml (Optional)

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repository: https://github.com/*****.github.io
  branch: master
  token: ghp_*****

Hexo and Plugin version(npm ls --depth 0)

$ npm ls --depth 0
hexo-site@0.0.0 F:\Hexo
+-- ajv@8.6.2
+-- ajv-keywords@5.0.0
+-- eslint@4.12.1
+-- hexo@5.4.0
+-- hexo-deployer-git@1.0.0
+-- hexo-generator-archive@0.1.5
+-- hexo-generator-category@0.1.3
+-- hexo-generator-feed@2.2.0
+-- hexo-generator-index@0.2.1
+-- hexo-generator-json-content@3.0.1
+-- hexo-generator-search@2.4.0
+-- hexo-generator-tag@0.2.0
+-- hexo-image-caption@0.1.1
+-- hexo-math@4.0.0
+-- hexo-pagination@1.0.0
+-- hexo-renderer-ejs@0.3.1
+-- hexo-renderer-marked@2.0.0
+-- hexo-renderer-pandoc@0.2.6
+-- hexo-renderer-pug@1.0.0
+-- hexo-renderer-sass@0.3.2
+-- hexo-renderer-scss@1.2.0
+-- hexo-renderer-stylus@0.3.3
+-- hexo-renderer-swig@1.1.0
+-- hexo-server@0.3.3
+-- hexo-tag-aplayer@3.0.4
+-- hexo-tag-bootstrap@0.1.2
+-- hexo-tag-cplayer@1.0.0
+-- hexo-tag-mplayer@1.0.1
`-- hexo-wordcount@6.0.1

Your package.json package.json

Others

@zcsheng95
Copy link

zcsheng95 commented Aug 19, 2021

I had the same issue and I solved it by change:
repository: https://github.com/*****.github.io
to
repository: https://oauth2:yourtoken@github.com/*****.github.io

@masterrite
Copy link
Author

I had the same issue and I solved it by change:
repository: https://github.com/*****.github.io
to
repository: https://oauth2:yourtoken@github.com/*****.github.io

Thanks! This works. Do you know why, though?

@FreshManCode
Copy link

You can change your url https format to ssh format in _config.yml file. Following is my example :
image

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 2, 2021
@github-actions github-actions bot closed this as completed Nov 9, 2021
@wtffqbpl
Copy link

You can change your url https format to ssh format in _config.yml file. Following is my example : image

thx homie, i've solved my problem with your method.

@FreshManCode
Copy link

you're welcome!

@Firestar-Reimu
Copy link

Firestar-Reimu commented Feb 3, 2023

Hope to support Fine-grained personal access tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants