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

Deploying the source files via `hexo-git-deployer` #4128

Open
cmp0xff opened this issue Feb 14, 2020 · 0 comments
Open

Deploying the source files via `hexo-git-deployer` #4128

cmp0xff opened this issue Feb 14, 2020 · 0 comments
Labels

Comments

@cmp0xff
Copy link

@cmp0xff cmp0xff commented Feb 14, 2020

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Question

I would like to deploy the source files to an additional src branch so that I can maintain my website on different machines. I was basically following this answer on Stackoverflow. However, I got problem with permissions of a specific file. Only if I run $ hexo deploy with root privilege can I deploy the source successfully.

I cannot write a comment on Stackoverflow because I do not have sufficient reputation there. Also the person who wrote the answer seems not to be active since months ago.

Environment & Settings

Node.js & npm version

v13.8.0
6.13.7

Your site _config.yml (Optional)

deploy:
  - type: git
    repo: git@github.com:<username>/<username>.github.io.git
    branch: master
  - type: git
    repo: git@github.com:<username>/<username>.github.io.git
    branch: src
    extend_dirs: /
    ignore_hidden: false
    ignore_pattern:
        public: .

Your theme _config.yml (Optional)

Hexo and Plugin version(npm ls --depth 0)

hexo-site@0.0.0 <local repo path>/<username>/<username>.github.io
├── hexo@4.2.0
├── hexo-deployer-git@2.1.0
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-index@1.0.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-stylus@1.1.0
└── hexo-server@1.0.0

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.2.0"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0"
  }
}

Others

If I run $ hexo deploy without root privilege, the error message reads

FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: EACCES: permission denied, copyfile '<local repo path>/<username>/<username>.github.io/.git/objects/06/3b27d8a4076d6f0748228cea43ffd963678206' -> '<local repo path>/<username>/<username>.github.io/.deploy_git/.git/objects/06/3b27d8a4076d6f0748228cea43ffd963678206'
@SukkaW SukkaW added the question label Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.