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

Problem with deployment on GitHub #1495

Closed
201507 opened this issue Sep 13, 2015 · 32 comments
Closed

Problem with deployment on GitHub #1495

201507 opened this issue Sep 13, 2015 · 32 comments

Comments

@201507
Copy link

201507 commented Sep 13, 2015

Hello!

Please, help someone solve the following problem. Before install Windows 10 I have everything worked fine under Windows 8.1, but now, in Windows 10, I observe the following problem:

  • perform command hexo clean — everything is fine;
  • perform command hexo generate — everything is fine;
  • perform command hexo deploy — I getting in response an error:
D:\Dev\GitHub\201507.github.io-hexo>hexo deploy
INFO  Deploying: git
INFO  Setting up Git deployment...
Initialized empty Git repository in D:/Dev/GitHub/201507.github.io-hexo/.deploy_git/.git/
[master (root-commit) bb9fe04] First commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 placeholder
INFO  Clearing .deploy folder...
INFO  Copying files from public folder...
warning: LF will be replaced by CRLF in 2015/07/30/hello-world/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in 2015/07/31/minos-error/index.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in 2015/08/01/dropbox-file-recovery/index.html.
The file will have its original line endings in your working directory.
...
warning: LF will be replaced by CRLF in webfonts/open-sans/main.css.
The file will have its original line endings in your working directory.
[master bfb9462] Site updated: 2015-09-13 23:02:45
 65 files changed, 13324 insertions(+)
 create mode 100644 2015/07/30/hello-world/index.html
 create mode 100644 2015/07/31/minos-error/index.html
 create mode 100644 2015/08/01/dropbox-file-recovery/index.html
 create mode 100644 2015/08/08/adding-swiftype-search-to-hexo/index.html
 create mode 100644 2015/08/12/kak-bystro-dobavit-udalit-rascladku-claviatury/index.html
 create mode 100644 CNAME
 create mode 100644 about/index.html
 create mode 100644 archives/2015/07/index.html
 create mode 100644 archives/2015/08/index.html
 create mode 100644 archives/2015/index.html
 create mode 100644 archives/index.html
 create mode 100644 atom.xml
...
 create mode 100644 webfonts/source-code-pro/fonts/mrl8jkM18OlOQN8JLgasD9V_2ngZ8dMf8fLgjYEouxg.woff2
 create mode 100644 webfonts/source-code-pro/fonts/mrl8jkM18OlOQN8JLgasDy2Q8seG17bfDXYR_jUsrzg.woff2
 create mode 100644 webfonts/source-code-pro/main.css
warning: LF will be replaced by CRLF in webfonts/source-code-pro/main.css.
The file will have its original line endings in your working directory.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument

    at ChildProcess.<anonymous> (D:\Dev\GitHub\201507.github.io-hexo\node_modules\hexo-util\lib\spawn.js:42:17)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

If I point in the configuration file to use SSH instead of HTTPS, I get this error:

...
The file will have its original line endings in your working directory.
On branch master
nothing to commit, working directory clean
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> (D:\Dev\GitHub\201507.github.io-hexo\node_modules\hexo-util\lib\spawn.js:42:17)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

The contents of my package.json file:

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.1.1"
  },
  "dependencies": {
    "hexo": "^3.1.1",
    "hexo-deployer-git": "0.0.4",
    "hexo-generator-archive": "^0.1.3",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.0.3",
    "hexo-generator-index": "^0.1.3",
    "hexo-generator-sitemap": "^1.0.1",
    "hexo-generator-tag": "^0.1.2",
    "hexo-renderer-ejs": "^0.1.0",
    "hexo-renderer-marked": "^0.2.5",
    "hexo-renderer-stylus": "^0.3.0",
    "hexo-server": "^0.1.2",
    "hexo-util": "^0.1.7"
  }
}

hexo v command output:

hexo: 3.1.1
os: Windows_NT 6.3.9600 win32 x64
http_parser: 2.3
node: 0.12.7
v8: 3.28.71.19
uv: 1.6.1
zlib: 1.2.8
modules: 14
openssl: 1.0.1p
git --version
git version 2.5.2.windows.2

How to beat this issue? What other information I can provide to solve this problem?

My repo with all config files can be found here: https://github.com/201507/201507.github.io-hexo

@Xuanwo
Copy link
Contributor

Xuanwo commented Sep 14, 2015

Which shell do you use?

@201507
Copy link
Author

201507 commented Sep 14, 2015

@Xuanwo, when installed Git I chose this option:

git_setup_2014 12 30_01-22-58

@younglaker
Copy link

I think I met the same problem. I reinstall the system(win 7, 64 bit) and update hexo dependencies.

It's fine to generate. When I deploy:

The file will have its original line endings in your working directory.
On branch master
nothing to commit, working directory clean
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.c om': Invalid argument
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument

Is there any problem with the github username? I am not sure how to correct it . I think I did it right:

$ git config user.name
younglaker

And the error say it is on master branch ? In hexo config I set gh-pages branch. I think here is the only place about github in hexo config :

# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/younglaker/blog.git
  branch: gh-pages

My hexo v

$ hexo v
hexo: 3.1.1
os: Windows_NT 6.1.7601 win32 x64
http_parser: 2.3
node: 0.12.6
v8: 3.28.71.19
uv: 1.6.1
zlib: 1.2.8
modules: 14
openssl: 1.0.1o

dependencies:

"dependencies": {
"hexo": "^3.1.0",
"hexo-deployer-git": "0.0.4",
"hexo-deployer-heroku": "0.0.3",
"hexo-deployer-openshift": "0.0.1",
"hexo-deployer-rsync": "^0.1.1",
"hexo-generator-archive": "^0.1.3",
"hexo-generator-category": "^0.1.3",
"hexo-generator-feed": "^1.0.2",
"hexo-generator-index": "^0.1.3",
"hexo-generator-sitemap": "^1.0.1",
"hexo-generator-tag": "^0.1.2",
"hexo-migrator-rss": "^0.1.2",
"hexo-renderer-ejs": "^0.1.0",
"hexo-renderer-marked": "^0.2.4",
"hexo-renderer-stylus": "^0.2.0",
"hexo-server": "^0.1.2"
}

git:

$ git version
git version 2.5.2.windows.2

@younglaker
Copy link

@201507
I try SSH instead HTTPS, it works.

If you still have problem with HTTPS, try this command:

ssh -T git@github.com

For more details : http://laker.me/blog/2015/09/18/Git-push常见报错/ .Hope it helps

@201507
Copy link
Author

201507 commented Sep 18, 2015

@younglaker, thanks for your reply. I will check your information and I will answer later.

@doesnta
Copy link

doesnta commented Sep 18, 2015

I have the same problem, and change https to ssh ,it didn't work for me. Did you solve it?@201507

@201507
Copy link
Author

201507 commented Sep 18, 2015

@doesnta, yes, I solved my problem by starting to use SSH instead HTTPS. The following information has helped to solve a problem:

@younglaker, many thanks for your hint 😉

@doesnta
Copy link

doesnta commented Sep 19, 2015

you say “If I point in the configuration file to use SSH instead of HTTPS, I get this error:” ,how can it work for you finally?I have the problem just like you ,even the wrong message,can you tell how can you fix it? @201507

my sshkey working fine.

@younglaker
Copy link

@doesnta He even haven't add ssh key.
If you're sure that your ssh key is fine , try to run this command:

ssh -T git@github.com

@doesnta
Copy link

doesnta commented Sep 19, 2015

@younglaker

$ ssh -T git@github.com
Enter passphrase for key '/c/Users/dell/.ssh/id_rsa':
Hi doesnta! You've successfully authenticated, but GitHub does not provide shell access.

but when i deploy the hexo ,it come out the wrong message:

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Do i miss something ?

@doesnta
Copy link

doesnta commented Sep 19, 2015

@younglaker
my _config.xml

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

i also add the remote url in the git/config,useless~~~

[remote "origin"]
    url = git@github.com:doesnta/doesnta@github.io.git
    fetch = +refs/heads/*:refs/remotes/github/*

@201507
Copy link
Author

201507 commented Sep 19, 2015

@doesnta, here are the steps I performed:

  1. Delete all keys in the folder C:\Users\your-username\.ssh\
  2. Download and install GitHub Desktop
  3. Log in to the GitHub Desktop
  4. The program will generate new SSH keys in C:\Users\your-username\.ssh\ folder (github_rsa.pub, github_rsa)
  5. Copy this keys and give them such names: id_rsa.pub, id_rsa
  6. Run the command ssh -T git@github.com and follow the prompts

If you have difficulty, use the information in these pages:

I hope you can understand my text. I have explained better, but my level of English is poor.

@doesnta
Copy link

doesnta commented Sep 20, 2015

@201507 thanks。

I solve this problem last night.It seem to be the git bug.so i change the git to lower edition.

@lzjqsdd lzjqsdd closed this as completed Sep 20, 2015
@hellodigua
Copy link

I meet same problems and try to input this command "ssh -T git@github.com"

it works.

thanks~

@rgodoyl
Copy link

rgodoyl commented Nov 13, 2015

201507 the answer that really works! Thank you

@online
Copy link

online commented Nov 13, 2015

@rgodoyl you're welcome! 😉

@ccsang
Copy link

ccsang commented Jan 17, 2016

I met the same problem with @doesnta.

my git version

$ git version
git version 2.5.0.windows.1

when i run ssh -T git@github.com

Enter passphrase for key '/c/Users/behappy/.ssh/id_rsa':
Hi tsunamidesign! You've successfully authenticated, but GitHub does not provide shell access.

@doesnta
Copy link

doesnta commented Jan 17, 2016

use the 1.9 version of git @tsunamidesign

@ccsang
Copy link

ccsang commented Jan 17, 2016

@doesnta thx a lot.

@GitHubThe
Copy link

@doesnta thx use the 1.9 version of git

@xiaotian044500
Copy link

@doesnta thx a lot. use SSH instead HTTPS

@expatsvpn
Copy link

Actually, I met this issue before, and I did try many ways, the best way I know is to use Power Shell instead of Git Bash.

@yuanrui
Copy link

yuanrui commented May 13, 2016

@doesnta Thanks. Mark, I have same problem, use this issue list solved.

@Xuanwo
Copy link
Contributor

Xuanwo commented May 13, 2016

So, the latest verison og git can't work fine in on win?

@blackie1019
Copy link

@Xuanwo Still have issue today!!!

@pabno
Copy link

pabno commented Aug 7, 2016

I met this issue too.I think this issue is about username of git.So i change git user.name and fixed that.

@WangYang-Rex
Copy link

@201507 thanks>
I solved this issue just now.

@dreambo8563
Copy link

meet the issus on git version 2.9.0.windows.1

@zhanba
Copy link

zhanba commented Aug 28, 2016

also meet host key verification failed. Then I push the '.deploy_git' folder , and it success! But 'hexo deploy' still don't work.

@zilonghe
Copy link

zilonghe commented Sep 6, 2016

@201507
it works!thanks!

@st2rseeker
Copy link

In case it still happens to people, the way I work over it is opening Git Bash, cd to your site directory and run hexo generate --deploy there inside Git Bash itself instead of using the Windows command-line. Seems to work consistently over a couple of PCs I use, even if it's less convenient.

@AlfyYan
Copy link

AlfyYan commented Jan 29, 2018

I solve the problem by deleting GitHub password in KeyChain Access. Then I execute the deploy command hexo d -g in the terminal after that the terminal will ask me for the github username and password. And just input the new account info then you can do as usual.

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