Simon Davies
Simon Davies

Reputation: 3684

GitBash on the MAC

I am trying to follow Set up SSH for Gi. it goes on about opening GitBash but is this something else to terminal? As i follow this within the mac terminal and i get most of it but the ending as it does not work so i think its GitBash i need and not terminal so where can i find this on the mac?

I get as far as step 5 then section 6 where when i reopen gitbash i should get the passphrase question etc but nothing and when i list identities ssh-add -l i get nothing.

Upvotes: -1

Views: 44127

Answers (2)

user456814
user456814

Reputation:

Edit

I was finally able to bring up the webpage at Set up SSH for Git. At the top of the page, you'll see a big green notice box with this message (emphasis mine):

Linux or Mac User?

This page shows you how to set up and use a single default SSH identity on Windows for a Git repository using GitBash. In the next page, you set up SSH for a Mercurial repository on Windows with TortoiseHg. If you are working on Mac OSX or Linux, a single set of instructions shows you how to setup and identity for either Git or Mercurial in these environments.

Since you're using a Mac, you should see if the instructions at the given help link solve your problems. To be clear, here is the link again:

If it helps, here is a screenshot of the original notice box too:

enter image description here


Old answer (still has useful info for running ssh-agent manually though)

I can't read your link right now because my browser won't open the page, but from your description, it sounds like you're trying to get ssh-agent to start automatically whenever you open up a terminal. Do you have ssh-agent already installed and in your path?

You don't need to configure ssh-agent to run automatically, you can just invoke it manually. Try

eval `ssh-agent -s`

Then run ssh-add to enter your passphrase for your private key. Be sure to shutoff ssh-agent when you're done using ssh-agent -k.

Upvotes: 0

alairock
alairock

Reputation: 1942

Atlassian has an AMAZING resource for GIT. If you are new to git, I would highly recommend using their GIT GUI, SourceTree

SourceTree should automatically setup GIT on your machine, and manage your repo right from the application.

Then you can just use the following command to see if you have git installed:

$ which git

If it doesn't come back empty, you have it installed. But at this point, you can do everything in SourceTree. No need to do it via command line.

Upvotes: -3

Related Questions