Information Technology Reference
In-Depth Information
Updates: You should update (download) a file or a complete project before you change it. This guaran-
tees that your version of the project includes the latest commits from other developers.
Push commands: You must use the command line to update local commits to the GitHub server.
Location: Instead of a disk location, the project is referenced using a remote server URL.
Creating a GitHub account
It's very easy to create a new free GitHub account. GitHub asks for a username, an e-mail address, and a pass-
word. You don't need to give any other details.
On GitHub, your username, e-mail address, and password are essential parts of the online access process. They
do more than log you in to the site, so you need them later when you create a user identity for Git on your Mac.
Optionally, you can add public contact information and other personal information to your account, but these
details aren't necessary for basic repo management.
TIP
If you have an account with an existing online service such as gravatar or WordPress, you can use your existing lo-
gin details. GitHub shares login information with all services that use the Automattic service. See automattic.com
for more details.
Creating a public key
Git communicates with GitHub via ssh (Secure Shell), which is a secure low-level protocol for data transfers
between devices. Before you can use ssh, you need to define and upload a binary key that signs communication
between your Mac and the GitHub server and makes it possible for GitHub to confirm your identity. Creating a
key is a slightly complex process, but you only need to do it once. Follow these steps:
1. Open Terminal.
2. Type cd ~/.ssh .
3. If there's no such file or directory, skip to Step 5.
4. If the directory exists, you may want to back up the contents to another directory using the cp
command. After you have a backup, delete the directory.
5. Type ssh-keygen -t rsa -C “youremail@address.com” . The e-mail address must match the one you use
as a GitHub login.
6. Type Return when asked for a filename to save to the default location.
7. Use a good password for the key, and enter it twice.
The ssh keygen utility creates a key and saves it to two files: id_rsa , which is the private key you don't
share with anyone, and id_rsa.pub , which is the public key file you need to copy to GitHub.
8. Type cat ~/.ssh/id_rsa.pub | pbcopy .
This copies the public part of the key to the clipboard.
9. Open your browser, and log in to GitHub.
10. Click Account Settings.
Search WWH ::




Custom Search