![](/img/trans.png)
[英]Not able to clone a git repo in Docker Quickstart Terminal - could not create work tree dir 'node-bulletin-board': Permission denied
[英]git clone fatal: cannot create work tree dir permission denied
所以我試圖從 git 克隆一個存儲庫,到我知道我有寫訪問權限的文件夾中。
我正在嘗試使用 IntelliJ 的內置 VCS 功能和來自 git-scm.com 的 git bash 程序克隆它,它們都返回以下錯誤:
fatal: could not create work tree dir '<repo name>' :
Permission denied
我做錯了什么?
使用須藤
sudo git clone <url>
錯誤很簡單。 您沒有給定目錄的權限。
您可以做幾件事,但最簡單的一件是嘗試克隆存儲庫 vi git bash
# go to any other directory where you have the permissions to write to
cd <some path>
# Check to see if you have permissions:
mkdir dummy
# Now once you have verified that you have write permissions -
# clone the project from the command line
git clone <url>
克隆項目后 - 在 IntelliJ 中打開它。
檢查目錄權限后(確保您有寫權限),請嘗試以下步驟:
cd ~/
mkdir code
cd code
git clone https://github.com/repo-name
一件事很清楚,您沒有給定目錄的權限。 因此,您既可以進行克隆,也可以通過選擇“以管理身份運行”來簡單地運行應用程序,如圖所示。
稍后,您可以使用 git clone https://github.com/forcedotcom/EMP-Connector.git
謝謝。
首先以管理員身份打開運行您的 cmd,然后移動到您要克隆存儲庫的文件夾。鍵入克隆命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.