Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git instaweb: The browser is not available

Tags:

git

macos

I'm trying to setup git instaweb to open in Chrome. I have set the default browser like so:

git config --global web.browser chrome

This change is reflected in my global .gitconfig, and the git-web--browse documentation says that chrome is available as something to pass in.

When I run git instaweb this is what I get:

The browser chrome is not available as 'chrome'.
http://127.0.0.1:1234    

I have also tried google-chrome and the same results happen. How can I set the web browser to actually open in chrome?

Running OSX 10.8.2

like image 747
MishieMoo Avatar asked Oct 05 '22 09:10

MishieMoo


1 Answers

Maybe it needs a solution similar to How can I configure git help to use Firefox?:

git config --global web.browser ch
git config --global browser.ch.cmd "open -a Google Chrome.app"

The OP MishieMoo reports you need the full path:

git config --global browser.ch.cmd "open -a \"/Applications/Google Chrome.app\""

Without the absolute path, it was trying to open Chrome.app in my current directory (which was not Applications)

like image 139
VonC Avatar answered Oct 10 '22 02:10

VonC