![]()
Run this command to copy your key to your clipboard: pbcopy /.git The last step is to let GitHub know about your SSH key so GitHub can recognize you. No matter what operating system version you run you need to run this command to complete this step: ssh-add -K ~/.ssh/id_rsaĪdding a new SSH key to your GitHub account If you're running macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain: Host * Run the following commands to add your SSH key to the ssh-agent. ssh-keygen -t rsa -C # Creates a new ssh key, using the provided email as a label Add your SSH key to the ssh-agent The default settings are preferred, so when you're asked to enter a file in which to save the key, just press Enter to continue. To do that you need to run the commands below, and make sure to substitute the placeholder with your email. If you don't have an SSH key you need to generate one. If you don't have either of those files then read on, otherwise skip the next section. ssh directory, if they existĬheck the directory listing to see if you have files named either id_rsa.pub or id_dsa.pub. Check for existing SSH keysįirst check for existing SSH keys on your computer by running: ls -al ~/.ssh These instructions are for those who wish to use SSH and not HTTPS, and are from the official documentation. Then, configure the remote and push to GitHub by running: git remote add origin If you are setting up a new repo, add at least one file and commit first. Set up a new or existing repo with HTTPS for GitHub If you did not, follow the instructions in the section below. Clone repositories using HTTPSĪfter creating a new repo on GitHub, clone it using: git clone These instructions are from the official documentation. git config -global credential.helper osxkeychain #Mac ask for git global config email every time passwordTo prevent git from asking for your username and password every time you push a commit you can cache your credentials by running the following command, as described in the instructions. There are also instructions for using SSH. #Mac ask for git global config email every time codeTo push code to your GitHub repositories, we will use the recommended HTTPS method. Git config -global user.email will get added to your. Next, we'll define your Git user (should be the same name and email you use for GitHub): git config -global user.name "Your Name Here" When done, to test that it installed properly you can run: git -versionĪnd which git should output /usr/local/bin/git. #Mac ask for git global config email every time installFor example, my OS X user is named chris so I can login to postgresql with that username.What's a developer without Git? To install, run: brew install git Launchctl load ~/Library/LaunchAgents/īy default the postgresql user is your current OS X username with no password. Ln -sfv /usr/local/opt/postgresql/*plist ~/Library/LaunchAgents Follow the instructions and run them: # To have launchd start postgresql at login: Once this command is finished, it gives you a couple commands to run. ![]() You can install PostgreSQL server and client from Homebrew: brew install postgresql ![]() When you're finished, you can skip to the Final Steps. Launchctl load ~/Library/LaunchAgents/īy default the mysql user is root with no password. Ln -sfv /usr/local/opt/mysql/*plist ~/Library/LaunchAgents ![]() Follow the instructions and run them: # To have launchd start mysql at login: You can install MySQL server and client from Homebrew: brew install mysql If you're coming from PHP, you may already be familiar with MySQL. If you're new to Ruby on Rails or databases in general, I strongly recommend setting up PostgreSQL. There is a lot of documentation on both, so you can just pick one that seems like you'll be more comfortable with. You'll probably want something more robust like MySQL or PostgreSQL. Chances are you won't want to use it because it's stored as a simple file on disk. Rails ships with sqlite3 as the default database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |