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

进行部署时候出现错误,该如何解决? #3043

Closed
forget1 opened this Issue Feb 23, 2018 · 15 comments

Comments

10 participants
@forget1

forget1 commented Feb 23, 2018

当我使用hexo d进行博客的部署时,控制台出现如图所示的错误,请问这是什么原因导致的呢?我该如何进行解决呢?

@JoeJoeyMa

This comment has been minimized.

JoeJoeyMa commented Feb 23, 2018

请查看在目录内_config.yml文件里的github地址是否填写正确,最好把内文件po出来方便进一步查看是什么问题

@forget1

This comment has been minimized.

forget1 commented Feb 23, 2018


# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/forget1/forget1.github.io.git
  branch: master
  
search:
  path: search.xml
  filed: post
  format: html
  limit: 10000


live2d:
  model: miku
  bottom: -60

这个是_comfig.yml中的相关代码,GitHub的地址填写没有出现错误。

@xiaotan828

This comment has been minimized.

xiaotan828 commented Feb 23, 2018

最近大家都出现了这个问题,https://superuser.com/questions/1297583/git-push-failing-with-fatal-httprequestexception-encountered 不是电脑或者文件本身的的问题,是Github最近停用了TLS 1.0和v 1.1,文章看这里
解决方案:在这个页面下载最新版Git Credential Manager for Windows

@JLHwung

This comment has been minimized.

Collaborator

JLHwung commented Feb 23, 2018

可以尝试以下设置:

deploy:
  type: git
  repo: git@github.com:forget1/forget1.github.io.git
  branch: master
@xiaotan828

This comment has been minimized.

xiaotan828 commented Feb 23, 2018

@JLHwung 最好能把这个页面置顶以下什么的,很多人应该都会遇到这个问题

@forget1

This comment has been minimized.

forget1 commented Feb 23, 2018

@vimcaw

This comment has been minimized.

Contributor

vimcaw commented Feb 24, 2018

@JLHwung 改完还是报错

deploy:
  type: git
  repo: git@github.com:vimcaw/blog.git
  branch: master
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    at ChildProcess.<anonymous> (C:\Users\vimcaw\Documents\GitHub\blog\node_modules\hexo-util\lib\spawn.js:37:17)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (C:\Users\vimcaw\Documents\GitHub\blog\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (internal/child_process.js:891:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
FATAL Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Error: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    at ChildProcess.<anonymous> (C:\Users\vimcaw\Documents\GitHub\blog\node_modules\hexo-util\lib\spawn.js:37:17)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (C:\Users\vimcaw\Documents\GitHub\blog\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (internal/child_process.js:891:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Process finished with exit code 2
@JLHwung

This comment has been minimized.

Collaborator

JLHwung commented Feb 25, 2018

@vimcaw What's the output of

ssh -v git@github.com

?
And how github.com is resolved?

nslookup github.com
@JLHwung

This comment has been minimized.

Collaborator

JLHwung commented Feb 25, 2018

Updated notice on hexo-deployer-git.

@JLHwung JLHwung closed this Feb 25, 2018

@breakingcoder

This comment has been minimized.

breakingcoder commented Apr 4, 2018

you can try command : "git config --global credential.helper wincred" in git bash terminal

@cnscorpions

This comment has been minimized.

cnscorpions commented Apr 4, 2018

resolved problem, thanks

@steve-yuan-8276

This comment has been minimized.

steve-yuan-8276 commented Jul 5, 2018

@xiaotan828 我 也遇到这个问题,请问在mac下如何解决呢?

@xiaotan828

This comment has been minimized.

xiaotan828 commented Jul 5, 2018

@steve-yuan-8276 你可以在这里尝试安装Git Credential Manager for Mac,理论上重新安装最新版git也能解决

@yyangMr

This comment has been minimized.

yyangMr commented Aug 22, 2018

windows把repo改为git@github.com:forget1/forget1.github.io.git解决了,谢谢

@YuanAaron

This comment has been minimized.

YuanAaron commented Nov 13, 2018

windows10 repo:git@github.com:forget1/forget1.github.io.git,problem solved,thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment