The hexo deploy command fails if you have 2-factor auth enabled on github. Here's the error:
Username for 'https://github.com': patrickberkeley
Password for 'https://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/patrickberkeley/patrickberkeley.github.io.git/'
And my config:
deploy:
type: github
repository: https://github.com/patrickberkeley/patrickberkeley.github.io.git
branch: master
I figured out the issue. I needed to the SSH repo url :facepunch:
deploy:
type: github
repo: [email protected]:patrickberkeley/patrickberkeley.github.io.git
branch: master
@patrickberkeley I've been hitting this same exact issue for the last 30 minutes or so.
I cannot figure out for the life of me why. I'm setting up very similar to you:
deploy:
type: github
repository: [email protected]:andrewmartin/andrewmartin.github.io.git
branch: master
And I hit the exact same error. WTF!
@andrewmartin try this, it worked for me.
deploy:
type: git
repository: [email protected]:xxxx/xxxx.github.io.git
branch: master
Thank you @patrickberkeley!
it's work! thankyou @patrickberkeley 馃憤
Most helpful comment
I figured out the issue. I needed to the SSH repo url :facepunch: