Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.94k stars 10.72k forks source link

unable to push changes #87609

Closed ans87gh closed 4 years ago

ans87gh commented 4 years ago

General troubleshooting steps

Description of issue

created rb for new cask

usenapp.rb

cask "usenapp" do version "0.80.5" sha256 "55e9da1c470b7de7972128315fdaa7fdcc8e14b8805289866b76b809983090fc"

url "https://www.usenapp.com/download/Usenapp-0.80.5.dmg" name "Usenapp" desc "Newsreader / usenet client for Mac OSX" homepage "https://www.usenapp.com/"

app "Usenapp.app"

zap trash: [ '~/Library/Application Support/Usenapp', '~/Library/Caches/com.xoroxsoft.usenapp', '~/Library/Preferences/com.xoroxsoft.usenapp.plist', '~/Library/Saved Application State/com.xoroxsoft.usenapp.savedState', ] end

went through systematically completing every step outlined on https://github.com/Homebrew/homebrew-cask/blob/master/doc/development/adding_a_cask.md

unable to push my branch usenapp-branch. Returning:

kex_exchange_identification: write: Broken pipe fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Changed my

Command that failed

{{git push ans87gh usenapp-branch}}

Output of command with --force --verbose --debug

{{Pushing to github.com:ans87gh/homebrew-cask.git
kex_exchange_identification: write: Broken pipe
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.}}

Output of brew cask doctor

{{Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have installed Bitdefender. The "Traffic Scan" option interferes with
Homebrew's ability to download packages. See:
  https://github.com/Homebrew/brew/issues/5558

Warning: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

}}

Output of brew tap

{{beeftornado/rmtree
buo/cask-upgrade
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
homebrew/services
mongodb/brew
nrlquaker/createzap
open-arsenal/hackers-brew
vitorgalvao/tiny-scripts
}}
miccal commented 4 years ago
Warning: You have installed Bitdefender. The "Traffic Scan" option interferes with
Homebrew's ability to download packages. See:
  https://github.com/Homebrew/brew/issues/5558

This may be the problem, but let's check -- go into your casks directory by running cd "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask, then run the command:

git remote -v

and please post the output.

ans87gh commented 4 years ago

ans87gh git@github.com:ans87gh/homebrew-cask.git (fetch) ans87gh git@github.com:ans87gh/homebrew-cask.git (push) origin https://github.com/Homebrew/homebrew-cask (fetch) origin https://github.com/Homebrew/homebrew-cask (push)

ans87gh commented 4 years ago

regarding Bitdefender, I haven't had an issue in the past pushing casks

miccal commented 4 years ago

In your casks directory, run the command:

git remote set-url ans87gh https://github.com/ans87gh/homebrew-cask

and then please post the output of git remote -v again.

ans87gh commented 4 years ago

ans87gh https://github.com/ans87gh/homebrew-cask (fetch) ans87gh https://github.com/ans87gh/homebrew-cask (push) origin https://github.com/Homebrew/homebrew-cask (fetch) origin https://github.com/Homebrew/homebrew-cask (push)

miccal commented 4 years ago

Ok, looks good -- now try pushing again.

ans87gh commented 4 years ago

will do - thanks! I'll keep you posted!

ans87gh commented 4 years ago

Worked until the END:

! [remote rejected] usenapp-branch -> usenapp-branch (refusing to allow an OAuth App to create or update workflow .github/workflows/automerge.yml without workflow scope) error: failed to push some refs to 'https://github.com/ans87gh/homebrew-cask' ???

miccal commented 4 years ago

Ok, you may need to delete your branch, update your fork and re-create your new cask.

In your casks directory, checkout the master branch by running git checkout master, then please post the output of git branch -a.

ans87gh commented 4 years ago

I thought I was starting over; here is the output:

icollections-branch

miccal commented 4 years ago

Are you still using any of these branches?

screenfocus-branch
sessionrestore-branch
slimhud-branch
usenapp-branch
windocd-branch
ans87gh commented 4 years ago

No. I was at one point when making the casks. I didn’t realize there were remnants.

miccal commented 4 years ago

Ok, run:

git branch -D screenfocus-branch sessionrestore-branch slimhud-branch usenapp-branch windocd-branch

then run:

git remote prune ans87gh

and then run:

git remote prune origin

then post the output of git branch -a again.

ans87gh commented 4 years ago

didn't change?

icollections-branch

ans87gh commented 4 years ago

correction - I see it now

miccal commented 4 years ago

Your remotes/ans87gh branches did not change?

ans87gh commented 4 years ago

no they did not

miccal commented 4 years ago

Ok, let's try updating your fork -- run:

git checkout master; git pull --rebase origin; git push ans87gh master
ans87gh commented 4 years ago

another error at the end:

To https://github.com/ans87gh/homebrew-cask ! [remote rejected] master -> master (refusing to allow an OAuth App to create or update workflow .github/workflows/automerge.yml without workflow scope) error: failed to push some refs to 'https://github.com/ans87gh/homebrew-cask'

miccal commented 4 years ago

Try again with --force:

git checkout master; git pull --rebase origin; git push --force ans87gh master
ans87gh commented 4 years ago

same outcome

miccal commented 4 years ago

Very odd -- when you run git config --list, are your user.email= and user.name= set correctly to those you use for GitHub?

DON'T post the output of git config --list, it may contain sensitive information.

miccal commented 4 years ago

You may need to create a new personal access token.

ans87gh commented 4 years ago

yes they are

miccal commented 4 years ago

If you go to https://github.com/settings/tokens, do you have a personal access token listed for hub?

ans87gh commented 4 years ago

that worked! Thanks miccal!