Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Bug Report #1

Closed
Ancientwood opened this issue Mar 15, 2019 · 5 comments
Closed

Bug Report #1

Ancientwood opened this issue Mar 15, 2019 · 5 comments

Comments

@Ancientwood
Copy link

sth shoud be added in Dockerfile

RUN npm install hexo --save
RUN npm install hexo-deployer-git --save
CMD ["chmod +x /entrypoint.sh"]

And how to make the verification via docker?

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
@heowc
Copy link
Owner

heowc commented Mar 26, 2019

Hello @Ancientwood ,

I think changed file permission while push to git?
I was checked permission of current files. the result is under line.

PS C:\~~> git clone https://github.com/heowc/action-hexo.git
PS C:\~~> cd .\action-hexo
PS C:\~~> git ls-tree HEAD
100644 blob 723ef36f4e4f32c4560383aa5987c575a30c6535    .gitignore
100755 blob 4bad7ccbc44a695bf9bbdc950c469658ae56097f    Dockerfile
100644 blob d6bcd50fd5a9c84a4bfe8307dee10a0066325a74    LICENSE
100644 blob 0e476322a351420d2f342de593a4dc112a680c06    README.md
100755 blob 0ce41d5a312a33f41d002f5e1b3aac2e7ca0479c    entrypoint.sh

and..

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

you maybe have to include access_token to repo when execute hexo deploy.

I used next code from _config.yml. {access_token} was issued token by https://github.com/settings/tokens.

deploy:
  type: git
  repo: https://{access_token}@github.com/heowc/heowc.github.io.git
  branch: master

If other problem, please comment detail situation.

@Ancientwood
Copy link
Author

I clone my repositories to my disk and checked the file permission, is 755.

Before that I fork and modified your project online .

/var/www                                                                                                                                                                                                         
▶ git clone git@github.com:Ancientwood/action-hexo.git
正克隆到 'action-hexo'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 42 (delta 20), reused 7 (delta 2), pack-reused 0
接收对象中: 100% (42/42), 8.90 KiB | 0 bytes/s, 完成.
处理 delta 中: 100% (20/20), 完成.
检查连接... 完成。

/var/www                                                                                                                                                                                                         
▶ cd action-hexo 

/var/www/action-hexo  master ✔                                                                                                                                                                              13d  
▶ git ls-tree HEAD
100644 blob 723ef36f4e4f32c4560383aa5987c575a30c6535    .gitignore
100755 blob 757040f646011c8f000ed6b6b4a1b7cee4139af3    Dockerfile
100644 blob d6bcd50fd5a9c84a4bfe8307dee10a0066325a74    LICENSE
100644 blob 0e476322a351420d2f342de593a4dc112a680c06    README.md
100755 blob 732c8f05e948b3fc2840d7bc40e1b709afdae9b9    entrypoint.sh

In my understanding, github Actions use the Docker? And the execute permission should be added in shell script?

Anyway, Put it aside.


I tested OAuth access token in _config.yml, It's SUCCEED!

I found the reason for my failure before, remote: Permission to Ancientwood/type-blog.git denied to Ancientwood.

Cuz I havent give the OAuth access token enough scopes to action.

And I think github will not able to push the token to github before.


Thx for your reply!

heowc added a commit that referenced this issue Apr 2, 2019
- add execute permission to entrypoint.sh
- add dependency hexo-deployer-git
heowc added a commit that referenced this issue Apr 2, 2019
- fix README.md
@heowc
Copy link
Owner

heowc commented Apr 2, 2019

I added code. d845f7b

Thank you for report.

@heowc heowc closed this as completed Apr 2, 2019
@JackEggie
Copy link

I also met this issue and resolved it by using the access token. Putting this issue as FAQ in readme may be more helpful.

@heowc
Copy link
Owner

heowc commented Jan 20, 2020

@JackEggie Thank you for feedback.
I will write FAQ in README. 😄

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

No branches or pull requests

3 participants