Hexo: Github deploy fails if you have 2-factor auth enabled

Created on 23 Feb 2014  路  5Comments  路  Source: hexojs/hexo

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

Most helpful comment

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

All 5 comments

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 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hjmJhon picture hjmJhon  路  3Comments

ghost picture ghost  路  3Comments

testareas picture testareas  路  3Comments

19uni94 picture 19uni94  路  3Comments

yunTerry picture yunTerry  路  3Comments