Ĭlick Generate new token button, provide token description, check repo and hit Generate token button.Īnd you will see your newly minted personal access token. Login to GitHub and go to Personal access tokens page at. So you need to create a personal access token that you will be using instead of password. The recommended way connecting to GitHub is over HTTPS as well as using 2FA (two-factor authentication). To be able to use Git (command line tool) to push changesets to GitHub, you need to authenticate yourself to GitHub. $ git config -global credential.helper 'cache -timeout=72000'Īuthenticating to GitHub from Git using HTTPS # Set the cache to timeout after 20 hours (setting is in seconds) $ git config -global credential.helper 'cache -timeout=3600' # Set the cache to timeout after 1 hour (setting is in seconds) $ git config -global credential.helper cacheīy default, the credential helper will cache your credentials for 15 minutes only, but you can increase password cache timeout. # Set the cache to timeout after 15 minutes by default If you would prefer that git keeps your credentials in cache – you need to configure credential helper. To verify configuration you can one of the two commands:Įvery time you are going to push your changeset to GitHub, it will ask for your credentials. $ git config -global user.email git config -global fault simple $ git config -global user.name "Your Name" To configure Git you need to provide at least your name and your email address. The latest version at the time of writing is 2.9.3Īfter executing above commands you’ll get Git version 2.9.3 installed. Let’s grab a copy of the source from git project mirror on GitHub at. $ sudo apt install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip Now we need to install packages required for building from source code: Let’s remove Git previously installed by package manager The second option is building Git from a source code. ![]() ![]() Installing Git by building it from a source code If that suits your needs – let’s just install it using package manager.Īt this point you may go to Configuring Git section. At the time of writing this post, the latest version of Git that is available is 2.9.3īut if you check what version is available by installing by package manager tool, it’s actually 2.7.4 This approach is pretty easy, but you won’t get the latest version of git. ![]() Installing Git using package management tool The first choice is to install Git using package management tool, and the second – to build it from a source code. Git is not installed by default and you have at least two choices to install it. Note: this post is a part of the series of posts about my experience using Ubuntu Desktop for software development. In this post I will share how to install Git and then configure it to work with GitHub.
0 Comments
Leave a Reply. |