Use two GitHub accounts on the same computer
Many developers have multiple GitHub accounts. One for personal projects, and another one for their work or business. There is a way to access multiple accounts simultaneously from the same computer. Only one account at a time can be configured using the…
Add SSH key access to a GitHub repository
Generate an SSH key pair In a terminal execute ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key : /Users/MY_USERNAME/Git/_Keys/MY_PROJECT/MY_PROJECT_rsa_ci Enter passphrase (empty for no passphrase): Enter same…
Install Git on Windows
If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub Configure Git for Windows Enable Page Up and Page Down Set up Git Bash to…
How to switch between GitHub accounts on your workstation
If you have multiple GitHub accounts and you want to switch between them you need to update the stored username and password on your workstation. On Windows See Git configuration
Display all teams you belong to in GitHub
To get the information on all teams you are part of in Github Open a Terminal window Execute this command with your Personal Access Token curl -H "Authorization: token YOUR_PERSONAL_ACCESS_TOKEN" https://api.github.com/user/teams The returned JSON will…
GitKraken installation and configuration
GitKraken is a Git user interface to manage Git repositories. Installation Download the GitKraken installer from https://www.gitkraken.com/download Configuration Start the GitKraken application Login with your GitHub account, or create a new account or…
Using Git
Frequently used Git commands Git runs entirely on your workstation, and a copy of the entire repository is also on your local hard drive. GitHub, BitBucket, and other providers only give you a storage space to allow you to share your repository…
Custom Git Status and Git Pull commands to work with all of your repositories
If you work with many Git repositories it is easy to miss a repository when you commit your changes, and very time consuming to pull from all repositories. It is easy to automate both processes. In this example, we will place all files in…
Add SSH key to a Jenkins Git step
To access a Git repository Jenkins can use an SSH key. To add the SSH key to the Jenkins server use the following Chef script Store the SSH key in an encrypted data bag called “keys”. { "id": "ci_private_keys", "ci_github_key": "-----BEGIN…
How to edit the GitHub README.md file
The GitHub repositories usually contain a README.md file to describe how to use the project. The GitHub web site has a simple editor, but it has a few limitations If you accidentally refresh the page, you lose your changes, The preview pane is wider than…