Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

command not found

I am trying to set up the terminal for github and I continually receive the message, command not found. How can I fix this? I have tried researching but I am getting no where. Any ideas?

We are going to need more context. What's the command exactly? What's the error message exactly?

garyhurd:~ garyhurd$ git --version
git version 1.8.5.2 (Apple Git-48)
garyhurd:~ garyhurd$ git config --global user.name "garylouhurd"
garyhurd:~ garyhurd$ git --global user.email garylouhurd@gmail.com
Unknown option: --global
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
garyhurd:~ garyhurd$ ~/.gitconfig
-bash: /Users/garyhurd/.gitconfig: Permission denied
garyhurd:~ garyhurd$ $ ssh -vT git@github.com
-bash: $: command not found
garyhurd:~ garyhurd$ 

here is a screenshot of my terminal. I have tried to go to the github download page and it just your download is starting and it stays there, it never downloads.

is there a bigger problem?

8 Answers

HI Stone please see the response I wrote to James.

here is whats causing your error

git --global user.email garylouhurd@gmail.com

you left out config. try using

git config --global user.email garylouhurd@gmail.com

HI Stone, Thank you, so I did that, now how can i see if this is working properly? Sorry to sound ignorant, but this is not my strong suit

just follow the instructions here. it should walk you through the process

I have been trying and this is what I get

garyhurd:~ garyhurd$ $echo 'This is input text' -bash: This is input text: command not found garyhurd:~ garyhurd$ $ echo 'username' -bash: $: command not found

what are you trying to accomplish with those commands? also the $ after your name marks the end of your prompt. you dont have to add another $ at the beginning of each command. If you see a $ at the beginning of a line of code, its usually just there to specify that the following command should be entered in terminal

The interesting, at least to me, is that I have the github icon with the little kitty and when I open it, i get the repositories.

you must have installed github for mac which is a GUI interface for interacting with git and github (as opposed to using the command line). I prefer the command line

I am just trying to set up github so I can work locally i guess. I think there I am missing something here. I want to be able to use github, do I need to be doing all of this? Since i have the interface do i need to do be doing the terminal? I have not used either so for me i do not have a preference

if all you want to do is work locally then all you need is git (which you have). if you want to be able to store your repositories remotely (on github) then yes you need to do this to set up your git hub account with git. The videos on treehouse only cover using github through the command line, and encourage you to use that over the GUI.

ok, so what is the terminal actually linking to on my computer and why cant the terminal access it? I am sorry for the questions, but i just want to get this working.

I told you what your original problem was (you forgot config), and I assume you fixed that correct? what problems are you having now exactly? If you follow the instructions in the page I linked you should be able to get it working

okay thank you, I am not sure I am following everything but I will keep trying.

no problem, if you run into any more issues you can post in this thread and ill try and help you out. Id also recommend you have a look at the Console Foundations Course to get more familiar with the command line