How to Sign Commits and Tags with GPG

Why Should You Use GPG? By default, Git will not verify your identity in each commit, which means someone can use your identity to push commits. This may be difficult to understand. Take GitHub as an example, to push commits, you need to register your SSH keys to GitHub. And you need to be an owner or contributor of a repo to push commits (otherwise, you have to use pull request). So it seems that there is no problem related to identity. It is not true. GitHub uses SSH Keys to identify you and let you push your commits. But Git itself does not use SSH Keys to identify you. Instead, it uses the name and email you set in Git to identity you. An example below is that my friend (Ricardo) registered his SSH Key but did not give his information to Git. As a result, he can push commits to our GitHub project. But the contributor is the name of his computer, and GitHub cannot find an account that matches the email address. An Example ...

Apr 30, 2018

How to Install Ruby (on Rails) on Mac

macOS already included Ruby. You can type ruby -v at a Terminal prompt to check Ruby version and see result like: ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17] If you are satisfied with the Ruby version, you can type gem install rails --no-ri --no-rdoc to install Rails. However, if you are not satisfied with the Ruby version or if you have multiple apps that run on different Ruby version, I would recommend you use RVM to manage Ruby. ...

Jan 22, 2018