Posts

Showing posts with the label GitHub

AWS Code Commit with Git Basics

Image
AWS Code Commit is a fully managed, secure, private Git repository service used to store, version, and collaborate on source code and other assets. It eliminates the need to host your own Git server and integrates tightly with AWS services. Let's start with creating a code commit repository from the AWS Console: Repository name is " book " and I am going to create a file from the console by the name called " facts.txt " with the below content. Here is the commit message for the file. Now, our file is ready. Take a note at the " Reference " as " main " which shows the file is created under main branch. No need to worry about the terms branch, commit and others. This series covers it. Now, our file is ready. Consider the file under the "main" branch is the ONE VIEWED/USED by everyone. Now, we have been asked to make changes to the file. Change the numbers from 8,848.86 to ~ 9,000 meters. In real, no organization allows to make chan...

GitHub Server Upgrade

Image
  Post shows how to upgrade a single instance GitHub server.  Before starting the upgrade make sure the GitHub is put on to the Maintenance mode. Here, We are going to upgrade from version 3.0 to 3.2. I always recommend to check the compatibility matrix before doing any upgrade. Steps are pretty straightforward: 1) Take a backup/snapshot of your existing GitHub instance. 2) Do a clean reboot. 3) Make sure / (root) and /var filesystem has enough free space. 4) Download the package. 5) Upgrade using # ghe-upgrade <Package Name> During the upgrade process, your a new virtual root partition would be created (/dev/sda2) and the server will be rebooted once completed. Once the server rebooted, verify the upgrade completed using # ghe-version Finally. Login to the UI and wait for the service to be reloaded and remove the maintenance mode. Upgrade should not affect your existing license. We are done with the upgrade.

GitHub - API

Image
What is a GitHub ? GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code.  Version control helps developers track and manage changes to a software project’s code. Most of Git operations can be performed by GUI. But, GitHub also provides API's to integrate its functionality in CI/CD pipepline. https://docs.github.com/en/get-started Before using GitHub API, You should be generating a token for authentication. Token can be generated from https://github.com/settings/tokens. Make sure the token has proper scope (permissions) to perform required operations. Below is the code to perform list all the repositories, create a repository, delete a repository. import json; import requests; baseurl= "https://api.github.com" ; token= "token" ; username= "rsinfominds" ; orgname= "RSInfoMindss" ; # I created a github organization called "RSInfoMindss" # https...