【问题标题】:Why GIT Fetch failed from IntelliJ and works from cygwin shell为什么 GIT Fetch 从 IntelliJ 失败并在 cygwin shell 中工作
【发布时间】:2015-10-22 10:41:48
【问题描述】:

我在 cygwin 中使用 git。从 cygwin shell 获取和克隆远程 repo 工作。但从 IntellJ IDEA 失败并显示消息:

获取失败:致命:解包对象失败

当尝试从 cygwin 执行 git pull 时,它可以工作,但从 IntelliJ 失败并出现错误:

致命:'pull' 似乎是一个 git 命令,但我们不是

知道怎么解决吗?

这是我的 git 配置:

core.autocrlf=true  
user.name=MyUser  
user.email=my@email.com  
core.repositoryformatversion=0  
core.filemode=false  
core.bare=false  
core.logallrefupdates=true  
core.ignorecase=true  
remote.origin.url=git@git.somedomain.com:myproject/myproject.git  
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*  
branch.master.remote=origin  
branch.master.merge=refs/heads/master  

【问题讨论】:

    标签: git intellij-idea cygwin


    【解决方案1】:

    将您的 cygwin bin 目录(可能是 C:\cygwin64\bin)添加到 Windows PATH 环境变量中。将 C:\cygwin64\bin\git.exe 设置为 intellij 中的 git 路径。

    【讨论】:

    • 我不知道为什么,但不知何故 git 从 intelij 开始工作。你提议的我已经完成了。
    猜你喜欢
    • 2014-01-18
    • 2011-04-11
    • 1970-01-01
    • 2011-12-06
    • 1970-01-01
    • 1970-01-01
    • 2011-03-09
    • 2012-09-03
    • 1970-01-01
    相关资源
    最近更新 更多