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

Added personal token in _config.yml but still can't access git #210

Open
masterrite opened this issue Aug 18, 2021 · 3 comments
Open

Added personal token in _config.yml but still can't access git #210

masterrite opened this issue Aug 18, 2021 · 3 comments

Comments

@masterrite
Copy link

masterrite commented Aug 18, 2021

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'

Here's the _config.yaml for deployer:

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repository: https://github.com/*****.github.io
  branch: master
  token: ghp_*****
@masterrite masterrite changed the title Added personal token in _config.yaml but still can't access git Added personal token in _config.yml but still can't access git Aug 18, 2021
@yangxyo
Copy link

yangxyo commented Aug 22, 2021

+1

@masterrite
Copy link
Author

masterrite commented Aug 22, 2021

Figured it out thanks to @zcsheng95: hexojs/hexo#4757 (comment).

However, this isn't is fix from hexo-deployer-git's side. It'd be nice to update the plugin.

@jos-app
Copy link

jos-app commented Sep 8, 2021

hexojs/hexo#4757 (comment) is right , you need add your username to the url, like this https://oauth2:ghp_********@github.com/yourusername/yourusername.github.io, it's work for me

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

No branches or pull requests

3 participants