Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failure while executing: git clone --depth 1 --branch v0.16.0 #1003

Closed
avelino opened this issue Sep 10, 2013 · 22 comments
Closed

Error: Failure while executing: git clone --depth 1 --branch v0.16.0 #1003

avelino opened this issue Sep 10, 2013 · 22 comments

Comments

@avelino
Copy link

avelino commented Sep 10, 2013

avelino@avelino /Library/Caches/Homebrew $ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failure while executing: git clone --depth 1 --branch v0.16.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
avelino@avelino /Library/Caches/Homebrew $

@sheerun
Copy link
Contributor

sheerun commented Sep 15, 2013

same. if I enter it manually, it downloads repo correctly

@phinze
Copy link
Contributor

phinze commented Sep 15, 2013

this one is really weird; seems like it might be a git issue or something. can you double check that this happens with the latest release of v0.16.2 after a brew update?

@avelino
Copy link
Author

avelino commented Sep 15, 2013

avelino@avelino /usr/local/Library (master) $ brew tap phinze/homebrew-cask
Cloning into '/usr/local/Library/Taps/phinze-cask'...
remote: Counting objects: 8297, done.
remote: Compressing objects: 100% (5425/5425), done.
remote: Total 8297 (delta 4012), reused 7073 (delta 2848)
Receiving objects: 100% (8297/8297), 5.51 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (4012/4012), done.
Checking connectivity... done
Tapped 1 formula
avelino@avelino /usr/local/Library (master) $ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failure while executing: git clone --depth 1 --branch v0.16.2 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
avelino@avelino /usr/local/Library (master) $

@sheerun
Copy link
Contributor

sheerun commented Sep 21, 2013

For some unknown reason it succeeded today.

@jsmitley
Copy link
Contributor

I've been having the same problem since yesterday (9/23/13), have never seen before. Like other people have noticed, I can manually run this command without a problem:

git clone --depth 1 --branch v0.16.2 https://github.com/phinze/homebrew-cask.git /Users/jsmitley/Library/Caches/Homebrew/brew-cask--git

$ git --version
git version 1.8.4
$ which git
/usr/local/bin/git
$ ls -al /usr/local/bin/git
lrwxr-xr-x 1 jsmitley admin 27 Sep 24 06:49 /usr/local/bin/git -> ../Cellar/git/1.8.4/bin/git
$ brew tap phinze/homebrew-cask
Cloning into '/usr/local/Library/Taps/phinze-cask'...
remote: Counting objects: 8740, done.
remote: Compressing objects: 100% (5767/5767), done.
remote: Total 8740 (delta 4293), reused 7334 (delta 2947)
Receiving objects: 100% (8740/8740), 5.57 MiB | 846.00 KiB/s, done.
Resolving deltas: 100% (4293/4293), done.
Checking connectivity... done
Tapped 1 formula
$ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failure while executing: git clone --depth 1 --branch v0.16.2 https://github.com/phinze/homebrew-cask.git /Users/jsmitley/Library/Caches/Homebrew/brew-cask--git

@phinze
Copy link
Contributor

phinze commented Sep 24, 2013

Hmm I'll have to do some more research on this one. Seems sporadic but recurs often enough that there's probably something to fix here.

@avelino
Copy link
Author

avelino commented Oct 8, 2013

found the problem?

@sheerun
Copy link
Contributor

sheerun commented Oct 8, 2013

It's not likely, but maybe it's some variation of Github issue I've noticed long time ago, but it wasn't fixed yet:

Fails:

git clone https://github.com/mileszs/ack.vim --depth=1 && 
  cd ack.vim && 
  git fetch --depth=10 && git fetch --depth=10

Succeeds:

git clone https://github.com/mileszs/apidock.vim.git --depth=1 && 
  cd apidock.vim && 
  git fetch --depth=10 && git fetch --depth=10

@avelino
Copy link
Author

avelino commented Oct 8, 2013

Work clone ack.vim:

avelino@avelino ~ $ git clone https://github.com/mileszs/ack.vim --depth=1 &&
cmdand>   cd ack.vim &&
cmdand cmdand>   git fetch --depth=10 && git fetch --depth=10
Cloning into 'ack.vim'...
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (9/9), done.
Checking connectivity... done
remote: Counting objects: 80, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 72 (delta 36), reused 44 (delta 10)
Unpacking objects: 100% (72/72), done.
fatal: git fetch-pack: expected shallow list
avelino@avelino ~/ack.vim (master) $ ls
README.md Rakefile  doc       plugin
avelino@avelino ~/ack.vim (master) $

@sheerun
Copy link
Contributor

sheerun commented Oct 8, 2013

Notice "fatal: git fetch-pack: expected shallow list"

On Tue, Oct 8, 2013 at 9:30 PM, Thiago Avelino [email protected]:

Work clone ack.vim:

avelino@avelino ~ $ git clone https://github.com/mileszs/ack.vim --depth=1 &&
cmdand> cd ack.vim &&
cmdand cmdand> git fetch --depth=10 && git fetch --depth=10
Cloning into 'ack.vim'...
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (9/9), done.
Checking connectivity... done
remote: Counting objects: 80, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 72 (delta 36), reused 44 (delta 10)
Unpacking objects: 100% (72/72), done.
fatal: git fetch-pack: expected shallow list
avelino@avelino ~/ack.vim (master) $ ls
README.md Rakefile doc plugin
avelino@avelino ~/ack.vim (master) $


Reply to this email directly or view it on GitHubhttps://github.com//issues/1003#issuecomment-25920152
.

@phinze
Copy link
Contributor

phinze commented Oct 8, 2013

Sorry for the trouble folks. 😿 I have yet to be able to reproduce this locally.

It smells to me like either a sporadic GitHub issue, or else there's some variable we have yet to isolate.

Those of you hitting the error - it's consistently reproducible on your system?

@phinze
Copy link
Contributor

phinze commented Oct 8, 2013

Also can those of you with this problem report your git --version as well?

@sheerun
Copy link
Contributor

sheerun commented Oct 8, 2013

@phinze I think the only solution is for homebrew to not use --depth 1 in git clone. I experienced many issues with that option, and cloned repo practically not useable, if you want to commit something / browse history. Maybe it's not exactly issue with "fatal: git fetch-pack: expected shallow list", but generally --depth 1 causes lot of problems.

@phinze
Copy link
Contributor

phinze commented Oct 8, 2013

I think this might be related:

Homebrew/legacy-homebrew#12024

@avelino
Copy link
Author

avelino commented Oct 8, 2013

it's consistently reproducible on your system? yes

avelino@avelino ~ $ git --version
git version 1.8.4

@avelino
Copy link
Author

avelino commented Oct 13, 2013

Upgrade OS X 10.8 to 10.9 installed brew-cask without problem.

must be some problem in OS X 10.8

@phinze
Copy link
Contributor

phinze commented Jan 28, 2014

Last activity 4months ago. Going to call this mysterious one closed... feel free to reopen if you experience it.

🎐

@phinze phinze closed this as completed Jan 28, 2014
@jun1st
Copy link

jun1st commented Feb 4, 2014

still have the issue

Failure while executing: git clone --depth 1 --branch v0.28.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git

git --version
git version 1.8.4.1

@hammady
Copy link

hammady commented Feb 10, 2014

Still facing it too. I have noticed that it attempts to install it into /Library/Caches which is obviously not possible without root for others, and for others in $HOME/Library/Caches.

On OSX 10.9:

$ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failure while executing: git clone --depth 1 --branch v0.28.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
$ git --version
git version 1.8.3.4 (Apple Git-47)

@gawbul
Copy link

gawbul commented Mar 31, 2014

I just hit this issue too:

$ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failed to download resource "brew-cask"
Failure while executing: git clone --depth 1 --branch v0.32.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git

verbose/debug:

/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/brew-cask.rb
/usr/local/Library/Formula/brew-cask.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/git.rb
==> Cloning https://github.com/phinze/homebrew-cask.git
git clone --depth 1 --branch v0.32.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
Error: Failed to download resource "brew-cask"
Failure while executing: git clone --depth 1 --branch v0.32.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
/usr/local/Library/Homebrew/resource.rb:82:in `fetch'
/usr/local/Library/Homebrew/resource.rb:51:in `stage'
/usr/local/Library/Homebrew/formula.rb:626:in `stage'
/usr/local/Library/Homebrew/formula.rb:268:in `brew'
/usr/local/Library/Homebrew/build.rb:151:in `install'
/usr/local/Library/Homebrew/build.rb:45:in `main'
/usr/local/Library/Homebrew/build.rb:12
/usr/local/Library/Formula/brew-cask.rb:14

git:

$ git --version
git version 1.9.1

@gawbul
Copy link

gawbul commented Apr 2, 2014

Tried brew edit brew-cask and appending :shallow => false to the url line as detailed here Homebrew/legacy-homebrew#25751, but still getting the error :(

require 'pathname'
require 'formula'

require Pathname(__FILE__).realpath.dirname.join('lib', 'cask', 'version')

class BrewCask < Formula
  homepage 'https://github.com/phinze/homebrew-cask/'
  url 'https://github.com/phinze/homebrew-cask.git', :tag => "v#{HOMEBREW_CASK_VERSION}", :shallow => false

  head 'https://github.com/phinze/homebrew-cask.git', :branch => 'master'

  skip_clean 'bin'

  def install
    man1.install 'doc/man/brew-cask.1'
    prefix.install 'lib' => 'rubylib'
    inreplace 'bin/brew-cask.rb', '/lib', '/rubylib'

    prefix.install 'Casks', 'bin'
    (bin+'brew-cask.rb').chmod 0755
  end
end
$ brew install brew-cask
==> Cloning https://github.com/phinze/homebrew-cask.git
Error: Failed to download resource "brew-cask"
Failure while executing: git clone --branch v0.32.0 https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git

@gawbul
Copy link

gawbul commented Apr 3, 2014

Also tried brew edit brew-cask:

require 'pathname'
require 'formula'

require Pathname(__FILE__).realpath.dirname.join('lib', 'cask', 'version')

class BrewCask < Formula
  homepage 'https://github.com/phinze/homebrew-cask/'
  url 'https://github.com/phinze/homebrew-cask.git', :tag => "v#{HOMEBREW_CASK_VERSION}"

  head 'https://github.com/phinze/homebrew-cask.git', :branch => 'master', :shallow => false

  skip_clean 'bin'

  def install
    man1.install 'doc/man/brew-cask.1'
    prefix.install 'lib' => 'rubylib'
    inreplace 'bin/brew-cask.rb', '/lib', '/rubylib'

    prefix.install 'Casks', 'bin'
    (bin+'brew-cask.rb').chmod 0755
  end
end

Still same problem, without --depth:

$ brew install brew-cask --HEAD -vd
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/brew-cask.rb
/usr/local/Library/Formula/brew-cask.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/git.rb
==> Cloning https://github.com/phinze/homebrew-cask.git
git clone --branch master https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
Error: Failed to download resource "brew-cask"
Failure while executing: git clone --branch master https://github.com/phinze/homebrew-cask.git /Library/Caches/Homebrew/brew-cask--git
/usr/local/Library/Homebrew/resource.rb:82:in `fetch'
/usr/local/Library/Homebrew/resource.rb:51:in `stage'
/usr/local/Library/Homebrew/formula.rb:626:in `stage'
/usr/local/Library/Homebrew/formula.rb:268:in `brew'
/usr/local/Library/Homebrew/build.rb:151:in `install'
/usr/local/Library/Homebrew/build.rb:45:in `main'
/usr/local/Library/Homebrew/build.rb:12
/usr/local/Library/Formula/brew-cask.rb:14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants