warning: templates not found /usr/local/git/share/git-core/templates

简介: 今天在 Mac 上用 SourceTree 克隆 svn 的时候, 出现了 warning: templates not found /usr/local/Git/share/git-core/templates 警告,导致克隆失败.

今天在 Mac 上用 SourceTree 克隆 svn 的时候, 出现了 warning: templates not found /usr/local/Git/share/git-core/templates 警告,导致克隆失败. 怎么办呢.

在终端输入 

open‍ /usr/local/

在打开的目录中可以看到:

  • 如果没有 git 目录

 

打开下面的地址,下载 git-osx 并安装,

http://git-scm.com/download/mac

  • 如果有 git 目录

 

并且相应的 share,git-core,templates 目录都有,,说明是权限的问题.

在终端输入:

sudo chmod -R 755 /usr/local/git/share/git-core/templates

 注意 sudo 创建目录需要输入当前 Mac 用户的密码

  •  最后重新 clone 项目

目录
相关文章
|
7月前
|
网络协议 Linux 网络安全
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
111 0
|
4月前
|
IDE 网络安全 开发工具
【Azure App Service】Local Git App Service的仓库代码遇见卡住不Clone代码的问题
【Azure App Service】Local Git App Service的仓库代码遇见卡住不Clone代码的问题
【Azure App Service】Local Git App Service的仓库代码遇见卡住不Clone代码的问题
|
IDE Shell 网络安全
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
404 0
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
|
2月前
|
存储 开发工具 数据安全/隐私保护
git报错The project you were looking for could not be found 解决方式
git报错The project you were looking for could not be found 解决方式
384 1
|
开发工具 git
project is registered as a Git root, but no Git repositories were found there
报错如下 我一开始想把项目推到git,但是发现右键没有git选项。于是我去搜为什么右键没git选项。给出的答案就是在版本控制中添加。 上图这个我添加的本身就是一个git项目,所以没有出现问题,但是如果本身项目还没有关联远程仓库的话,这样搞是会出现问题。
804 0
project is registered as a Git root, but no Git repositories were found there
|
6月前
|
开发工具 git
git push xxx not found问题解决
git push xxx not found问题解决
|
7月前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
189 0
|
开发工具 git
部署hexo遇到报错ERROR Deployer not found: git的解决办法
部署hexo遇到报错ERROR Deployer not found: git的解决办法
604 0
|
开发工具 git
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
368 0
|
jenkins 持续交付 开发工具
jenkins无法连接仓库:Command “/usr/bin/git ls-remote -h -- https://gitee.com/xxx.git HEAD“ returned
jenkins无法连接仓库:Command “/usr/bin/git ls-remote -h -- https://gitee.com/xxx.git HEAD“ returned
1200 1
jenkins无法连接仓库:Command “/usr/bin/git ls-remote -h -- https://gitee.com/xxx.git HEAD“ returned