Git 錯誤訊息處理

git 出現 fatal: not a git repository (or any of the parent directories)問題

錯誤訊息為:fatal: not a git repository (or any of the parent directories): .git
中譯:找不到 .git 這樣的目錄。

使用 git init 指令

1
git init

remote: Support for password authentication was removed on August 13, 2021.

1
2
3
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/gpg-team/lottery-front.git/'

處理方式:生成令牌

登入git

Settings

選擇 Develop Setting

選擇 Tokens 點選Generate token

全新版本,克隆的时候也在​​​github.com​​前面加个令牌

1
git clone https://(TOKEN)@github.com/網址.git 

全新版本,克隆的时候也在​​​github.com​​前面加个令牌

1
git clone -b <分支名稱> https://<TOKEN>@github.com/網址.git