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

fatal: not in a git directory #32

Open
jiayechao opened this issue Feb 10, 2023 · 2 comments
Open

fatal: not in a git directory #32

jiayechao opened this issue Feb 10, 2023 · 2 comments

Comments

@jiayechao
Copy link

配置文件

name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{token}}
TARGET_REPO: jiayechao/teamsite
TARGET_BRANCH: gh-pages
BUILD_SCRIPT: npm install && npm run docs:build
BUILD_DIR: docs/.vuepress/dist

报错信息

Build success
==> Changing directory to 'docs/.vuepress/dist' ...
==> Prepare to deploy
Initialized empty Git repository in /github/workspace/docs/.vuepress/dist/.git/
fatal: not in a git directory

@hhhxiao
Copy link

hhhxiao commented Feb 10, 2023

同是这个问题,请问你现在知道怎么解决吗

@island086
Copy link

BUILD_SCRIPT: git config --global --add safe.directory "*" && npm install&& npm run docs:build

应该是新的ubuntu的镜像 安装的 git 进行了版本升级,添加了新的目录安全限制。加上这个就可以了。

Qwasyx added a commit to ScoreSaber/scoresaber-wiki that referenced this issue Feb 28, 2023
Fix "fatal: not in a git directory" error as per jenkey2011/vuepress-deploy#32
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

3 participants