diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 7a2eaca733..5a2112862e 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -325,7 +325,11 @@ module Homebrew odie "Unable to fork: #{e.message}!" end - remote_url = response.fetch("clone_url") + if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*") + remote_url = response.fetch("ssh_url") + else + remote_url = response.fetch("clone_url") + end username = response.fetch("owner").fetch("login") safe_system "git", "fetch", "--unshallow", "origin" if shallow