为什么GIT Fetch从IntelliJ失败并且从cygwin shell开始工作

时间:2015-10-22 10:41:48

标签: git intellij-idea cygwin

我正在使用git和cygwin。从cygwin shell获取和克隆远程仓库。但是来自IntellJ IDEA的消息失败了:

  

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

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

  

致命:'拉'似乎是一个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  

1 个答案:

答案 0 :(得分:5)

将您的cygwin bin目录(可能是def product_params params.require(:product).permit(:title, :body, :price, :active, :state, :hardcopy_book, :online_only, :online_hardcopy, :expiration, :monthly, :annual, :user_id, :book, :id, :book_ids => []) end )添加到Windows PATH环境变量中。将C:\cygwin64\bin设置为intellij中git的路径。