Giter Club home page Giter Club logo

Comments (38)

hoangkn avatar hoangkn commented on June 18, 2024 1

I have had a similar error. Have you setup SSH key on your computer and GitHub?
https://help.github.com/articles/generating-an-ssh-key/

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024 1

@vitorgalvao so its seems like this option definitely, because I had successfully submitted this PR with all options same except this. I just removed it. Homebrew/homebrew-cask-versions#2162

[push]
default = upstream

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024 1

Definitely something that hub intends to work on.

Fortunately, it’s also something that it seems we can work around in with cask-repair.

Should be fixed in the now released version. Thank you all for the reports.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Do this and this, and report back.

from tiny-scripts.

OmgImAlexis avatar OmgImAlexis commented on June 18, 2024

I've got the a similar issue.

To [email protected]:OmgImAlexis/homebrew-cask.git
 ! [remote rejected] cask-repair_update-radio-silence -> cask-repair_update-radio-silence (shallow update not allowed)
error: failed to push some refs to '[email protected]:OmgImAlexis/homebrew-cask.git'
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-radio-silence
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-radio-silence

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

@OmgImAlexis Then please run the requested commands. I keep asking an no one does it. Until someone does, I won’t be able to debug this.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Closing. Won’t tackle the issue until someone runs the requested commands.

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

Please reopen

$ brew info cask-repair hub | grep -E '(cask-repair:|hub:)'?
vitorgalvao/tiny-scripts/cask-repair: stable 0.23.1
hub: stable 2.2.3 (bottled), HEAD

What’s the exact cask-repair command you ran?

cask-repair -l origin -p yurikoles epic-game-launcher

In which directory are you? Are you right on the tap, or another directory?

/usr/local/Library/Taps/caskroom/homebrew-cask/Casks

What are the outputs of:

git diff --shortstat
git status --porcelain

no output

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

@yurikoles Thank you. Can you still reproduce the issue?

My question being: “if you run the same command twice in a row, does it fail twice, or just the first time?”.

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

@vitorgalvao yes, its always reproducible.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Do git reset HEAD --hard && git clean -d --force and then try again. Does the error still happen?

from tiny-scripts.

howie avatar howie commented on June 18, 2024

yes, after git reset HEAD --hard && git clean -d --force still error.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Need a git remote -v from all of you.

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)
yurikoles   [email protected]:yurikoles/homebrew-cask.git (fetch)
yurikoles   [email protected]:yurikoles/homebrew-cask.git (push)

from tiny-scripts.

howie avatar howie commented on June 18, 2024

howie [email protected]:howie/homebrew-cask.git (fetch)
howie [email protected]:howie/homebrew-cask.git (push)
origin https://github.com/caskroom/homebrew-cask (fetch)
origin https://github.com/caskroom/homebrew-cask (push)

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Do

git rebase --abort
git am --abort

and try again. Does that fix it?

from tiny-scripts.

joeygravlin avatar joeygravlin commented on June 18, 2024

I was having the same issue, with git remote -v outputing:

joeygravlin https://github.com/joeygravlin/homebrew-cask (fetch)
joeygravlin https://github.com/joeygravlin/homebrew-cask (push)
origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)

@vitorgalvao's most recent suggestion fixed it for me.

from tiny-scripts.

nstCactus avatar nstCactus commented on June 18, 2024

I'm having the same issue and nothing seems to be able to fix it.

Here is the output of git remote -v:

nstCactus [email protected]:nstCactus/homebrew-cask-versions.git (fetch)
nstCactus [email protected]:nstCactus/homebrew-cask-versions.git (push)
origin https://github.com/caskroom/homebrew-versions (fetch)
origin https://github.com/caskroom/homebrew-versions (push)

And here is what I did:

  1. Upgrade hub: brew upgrade hub => Error: hub 2.2.3 already installed
  2. Update cask-repair brew upgrade cask-repair => Error: vitorgalvao/tiny-scripts/cask-repair 0.23.2 already installed
  3. Tried the running the script cask-repair --pull origin --push nstCactus airmail-beta => Unprocessable entity
  4. Ran git rebase --abort => No rebase in progress?
  5. Ran git am --abort => fatal: Resolve operation not in progress, we are not resuming.
  6. git branch -D on anything but master
  7. Went to my github fork and deleted any remote branch but master
  8. Tried again: cask-repair --pull origin --push nstCactus airmail-beta => Same output as in first try:

cask 'airmail-beta' do
version '2.6.1,364'
sha256 '447ce9fe31cdeab0c4e9ce7fb9d7ee6b44b47e3bdaf12b8abf541c4cf21472dd'

hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04 was verified as official when first introduced to the cask

url 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/245?format=zip&'
appcast 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04',
checkpoint: 'fb401617167497f4161a0aa16d8c7d773d895c3148d5c7ef34195d5924935731'
name 'AirMail'
homepage 'http://airmailapp.com/beta/'
license :commercial

app 'AirMail Beta.app'

end

Type the new version (or leave blank to use the current one)

3.0,366
Paste the new URL (or leave blank to use the current one)
https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/246?format=zip
==> Downloading external files for Cask ./airmail-beta.rb
==> Downloading https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e
######################################################################## 100,0%
==> No checksum defined for Cask airmail-beta, skipping verification
==> Success! Downloaded to -> /Library/Caches/Homebrew/airmail-beta-3.0,366
diff --git a/Casks/airmail-beta.rb b/Casks/airmail-beta.rb
index 5e80f8f..e639914 100644
--- a/Casks/airmail-beta.rb
+++ b/Casks/airmail-beta.rb
@@ -1,11 +1,11 @@
cask 'airmail-beta' do

  • version '2.6.1,364'
  • sha256 '447ce9fe31cdeab0c4e9ce7fb9d7ee6b44b47e3bdaf12b8abf541c4cf21472dd'
  • version '3.0,366'
  • sha256 '11d49794b27b11aac027256e402fd3e55830d32bd062343ba67d78f4160dccc6'

hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04 was verified as official when first introduced to the cask

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

That's as much info as I can gather. Hope this helps!

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Thank you all for the details. It seems like all of you are running this from $(brew --repository)/Library/Taps/caskroom/…, is that correct?

I’d like you to run a few more commands, then. Make sure you’re in the correct directory for running cask-repair and:

git checkout master
git pull rebase origin master
cask-repair --push {{your_push_remote}} --delete-branches
git push {{your_push_remote}} master

This will make sure you’re on master, pull the latest changes, delete any cask-repair-created branches, and make sure your remote is up-to-date with the main repo.

After that, please retry your failing cask-repair commands.

from tiny-scripts.

nstCactus avatar nstCactus commented on June 18, 2024

Yes it is correct, this is the full path: $(brew --repository)/Library/Taps/caskroom/homebrew-cask.

Here is the results you asked:

git checkout master

Already on 'master'
Your branch is up-to-date with 'origin/master'.

git pull && git rebase origin master

remote: Counting objects: 28, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 28 (delta 18), reused 13 (delta 5), pack-reused 0
Unpacking objects: 100% (28/28), done.
From https://github.com/caskroom/homebrew-cask
773e15b..d71d907 master -> origin/master
Updating 773e15b..d71d907
Fast-forward
Casks/clipy.rb | 6 +++---
Casks/cycling74-max.rb | 4 ++--
Casks/dwarf-fortress-lnp.rb | 13 +++++++++++++
Casks/knock.rb | 10 ++++++++++
Casks/mongochef.rb | 2 +-
Casks/picat.rb | 13 +++++++++++++
Casks/porting-kit.rb | 25 +++++++++++++++++++++++++
7 files changed, 67 insertions(+), 6 deletions(-)
create mode 100644 Casks/dwarf-fortress-lnp.rb
create mode 100644 Casks/picat.rb
create mode 100644 Casks/porting-kit.rb
Current branch master is up to date.

cask-repair --push nstCactus --delete-branches

remote: Counting objects: 225, done.
remote: Compressing objects: 100% (170/170), done.
remote: Total 225 (delta 191), reused 84 (delta 52), pack-reused 0
Receiving objects: 100% (225/225), 28.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (191/191), completed with 188 local objects.
From github.com:nstCactus/homebrew-cask

  • [new branch] airmail-beta -> nstCactus/airmail-beta
  • [new branch] audit-links -> nstCactus/audit-links
  • [new branch] brew-cask-outdated -> nstCactus/brew-cask-outdated
  • [new branch] f-https-sourceforge-urls -> nstCactus/f-https-sourceforge-urls
  • [new branch] f-install-exact-match-searches -> nstCactus/f-install-exact-match-searches
  • [new branch] fix-alfred-preference-install -> nstCactus/fix-alfred-preference-install
  • [new branch] gh-pages -> nstCactus/gh-pages
  • [new branch] info-machine-readable-requires-sudo -> nstCactus/info-machine-readable-requires-sudo
  • a6e2273...e8d23f8 master -> nstCactus/master (forced update)
  • [new branch] mountain-duck -> nstCactus/mountain-duck
  • [new branch] revert-10854-master -> nstCactus/revert-10854-master
git push nstCactus master --force

Counting objects: 11039, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4810/4810), done.
Writing objects: 100% (11039/11039), 1.78 MiB | 187.00 KiB/s, done.
Total 11039 (delta 7916), reused 9231 (delta 6222)
To [email protected]:nstCactus/homebrew-cask.git
! [remote rejected] master -> master (shallow update not allowed)
error: failed to push some refs to '[email protected]:nstCactus/homebrew-cask.git'

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

@nstCactus I see (in your last command):

! [remote rejected] master -> master (shallow update not allowed)

Does this fix that? And if so, does your cask-repair command keep failing?

from tiny-scripts.

nstCactus avatar nstCactus commented on June 18, 2024

git fetch --unshallow nstCactus made me able to push to my fork again.

I then ran these commands:

cd "$(brew --repository)/Library/Taps/caskroom/homebrew-versions/Casks"
echo "=> Checking out master"
git checkout master
echo "=> Pulling & rebasing"
git pull && git rebase origin master
echo "=> Deleting remote branches"
cask-repair --push nstCactus --delete-branches
echo "Pushing"
git push nstCactus master --force
echo "Trying to fix the cask"
cask-repair --pull origin --push nstCactus airmail-beta

=> Checking out master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
=> Pulling & rebasing
Already up-to-date.
Current branch master is up to date.
=> Deleting remote branches
Pushing
Everything up-to-date
Trying to fix the cask

 cask 'airmail-beta' do
   version '2.6.1,364'
   sha256 '447ce9fe31cdeab0c4e9ce7fb9d7ee6b44b47e3bdaf12b8abf541c4cf21472dd'

   # hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04 was verified as official when first introduced to the cask
   url 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/245?format=zip&'
   appcast 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04',
       checkpoint: 'fb401617167497f4161a0aa16d8c7d773d895c3148d5c7ef34195d5924935731'
   name 'AirMail'
   homepage 'http://airmailapp.com/beta/'
   license :commercial

   app 'AirMail Beta.app'
end

Type the new version (or leave blank to use the current one)

3.0,366
Paste the new URL (or leave blank to use the current one)
https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/246?format=zip 3 ==> Downloading external files for Cask ./airmail-beta.rb
==> Downloading https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1
########################################################### 100,0%
==> No checksum defined for Cask airmail-beta, skipping verification
==> Success! Downloaded to -> /Library/Caches/Homebrew/airmail-beta-
diff --git a/Casks/airmail-beta.rb b/Casks/airmail-beta.rb
index 5e80f8f..fb64e61 100644

--- a/Casks/airmail-beta.rb
+++ b/Casks/airmail-beta.rb
@@ -1,11 +1,11 @@
 cask 'airmail-beta' do
-  version '2.6.1,364'
-  sha256 '447ce9fe31cdeab0c4e9ce7fb9d7ee6b44b47e3bdaf12b8abf541c4cf21472dd'
+  version '3.0,366'
+  sha256 '11d49794b27b11aac027256e402fd3e55830d32bd062343ba67d78f4160dccc6'

   # hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04 was verified as official when first introduced to the cask
-  url 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/245?format=zip&'
+  url 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04/app_versions/246?format=zip&'
   appcast 'https://rink.hockeyapp.net/api/2/apps/84be85c3331ee1d222fd7f0b59e41b04',
-          checkpoint: 'fb401617167497f4161a0aa16d8c7d773d895c3148d5c7ef34195d5924935731'
+          checkpoint: '63071cbc3e38e17842cab7d296e85dda1ed7cd90b3ac152aa70fc0a125124096'
   name 'AirMail'
   homepage 'http://airmailapp.com/beta/'
   license :commercial

Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-airmail-beta
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between master and cask-repair_update-airmail-beta

There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?

from tiny-scripts.

zebastiane avatar zebastiane commented on June 18, 2024

I had the same error, and @hoasito's solution worked for me. Thanks.

from tiny-scripts.

howie avatar howie commented on June 18, 2024

I still got same problem, no mater @hoasito 's and @nstCactus 's solution ~ Orz..

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

One more:

  1. Clone your own repo somewhere (not the main repo)
  2. Add the main repo as the upstream remote.
    1. This means you’ll now have your repo as origin and the main one as remote.
  3. Pull and merge changed from upstream.
  4. Try cask-repair.

from tiny-scripts.

jmsalcido avatar jmsalcido commented on June 18, 2024

Well, I had to create the PR manually, but... cask-repair actually helped, thanks everyone.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

Closing until I get a reply with this test.

What I know is this bug is either in hub, or in cask-repair’s command that uses hub. Look for the bug in question, and you’ll see multiple open and closed issues on hub’s issue tracker pertaining to them.

What I don’t know is precisely what is causing it or how to fix it. I’ve tried it in multiple ways, and I simply am not able to reproduce it. If anyone can figure it out, I’ll gladly take a PR or a suggestion in the right direction.

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

@vitorgalvao sorry, I had reproduced it, but I had forgot to report back. Now I tried it on another machine with same result, so please reopen.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

I had reproduced it, but I had forgot to report back

So you tried these actions and still got the error?

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

@vitorgalvao yes. I'm now trying with recreated .gitconfig, only username and email have set and voila! Homebrew/homebrew-cask-versions#2161
here is my old .gitconfig https://gist.github.com/yurikoles/5c41e9eeac02c2641c1e9c965a340680

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

I will try to play with different options from my old .gitconfig, especially

[push]
default = upstream

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

@yurikoles Ah, it seems like you’re onto something!

Can everyone else:

  1. Share their .gitconfig (omitting potentially private values, but not the keys).
  2. Try a .gitconfig with only a username and email.

from tiny-scripts.

howie avatar howie commented on June 18, 2024

Yes! I can confirm @yurikoles
After mark defalut = upstream , it work !
Homebrew/homebrew-cask#21697

from tiny-scripts.

yurikoles avatar yurikoles commented on June 18, 2024

@vitorgalvao please provide us a workaround or at least document the bug.
Is it in cask-repair or in hub?

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

I’ve changed slightly how the fix works, so please let me know if you have issues again.

from tiny-scripts.

pat-s avatar pat-s commented on June 18, 2024

Facing this issue when running cask-repair --pull origin --push pat-s jabref. Updating other casks works.

cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
cask-repair --pull origin --push pat-s jabref
cask 'jabref' do
  version '3.6'
  sha256 '1eabadccc6eca0c4a7157870509e8d5702351cf9f438d126e25859c92edae52a'

  # github.com/JabRef/jabref was verified as official when first introduced to the cask
  url "https://github.com/JabRef/jabref/releases/download/v#{version}/JabRef_macos_#{version.dots_to_underscores}.dmg"
  appcast 'https://github.com/JabRef/jabref/releases.atom',
          checkpoint: '0cff3ed91fec9ffd92eb9592882c38f7f630fbb57c17e50fc1bc70f997b77729'
  name 'JabRef'
  homepage 'https://www.jabref.org/'
  license :gpl

  installer script: 'JabRef Installer.app/Contents/MacOS/JavaApplicationStub',
            args:   [
                      '-q',
                      '-VcreateDesktopLinkAction$Boolean=false',
                      '-VaddToDockAction$Boolean=false',
                      '-VshowFileAction$Boolean=false',
                      '-Vsys.installationDir=/Applications',
                      '-VexecutionLauncherAction$Boolean=false',
                    ],
            sudo:   false

  uninstall delete: '/Applications/JabRef.app'
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Type the new version (or leave blank to use the current one)
> 3.6
==> Downloading external files for Cask ./jabref.rb
==> Downloading https://github.com/JabRef/jabref/releases/download/v3.6/JabRef_macos_3_6.dmg
######################################################################## 100,0%
==> No checksum defined for Cask jabref, skipping verification
==> Success! Downloaded to -> /Users/pjs/Library/Caches/Homebrew/Cask/jabref--3.6.dmg
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Is everything correct? You can also make further manual edits (y/n/e) y
Submitting…
On branch cask-repair_update-jabref
nothing to commit, working tree clean
Error creating pull request: Unprocessable Entity (HTTP 422)
No commits between caskroom:master and pat-s:cask-repair_update-jabref
Error creating pull request: Unprocessable Entity (HTTP 422)
No commits between caskroom:master and pat-s:cask-repair_update-jabref

git remote --verbose

origin  https://github.com/caskroom/homebrew-cask (fetch)
origin  https://github.com/caskroom/homebrew-cask (push)
pat-s   https://github.com/pat-s/homebrew-cask.git (fetch)
pat-s   https://github.com/pat-s/homebrew-cask.git (push)

from tiny-scripts.

bondolo avatar bondolo commented on June 18, 2024

Telling git my github public key resolved the issue for me:

GIT_SSH_COMMAND="ssh -i ~/.ssh/github.pub" cask-repair -i java-jdk-javadoc

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 18, 2024

@bondolo #87 should have fixed it, but if it hasn’t, I’ll keep your solution in mind. Thank you.

from tiny-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.