Loading....

How to install GitHub enterprise and migration from AWS CodeCommit

Introduction

Ready to level up your version control game? This comprehensive guide dives deep into installing and configuring GitHub Enterprise Server on AWS. We’ll guide you through

  • Obtaining a free trial license
  • Setting up the server instance
  • How to seamlessly migrate your existing repositories from AWS CodeCommit.

Take control of your code with the robust features and security of GitHub Enterprise, all hosted on your own infrastructure.

Obtaining GitHub Enterprise License Key 

Head over to the https://github.com/enterprise and click on “Start a free trial” button.

Choose a relevant plan, here we will choose “Enterprise Server” plan as we will be deploying GitHub enterprise on server. 

Enter your personal details including your work email and choose “Deploy Github on your own servers”. GitHub offers a generous 45-day free trial of Enterprise Server to get you started. 

Accept terms and conditions, then click “Get Started”.

Once done, you will reciee an email from GitHub. Follow the instructions sent via email by GitHub team

Navigate to the “Access your account dashboard and start your trial” URL mentioned in the email. It will redirect you to the GitHub Enterprise page.

Enter your username with a strong password. Then click “Join” button to create an account.

Once logged in, navigate to Download button on top bar. Then click “download your license” in Step 1 to get the latest release of GitHub Enterprise.

Then click “Get the latest relese of GitHub Enterprise” button on step 2. On the “Download Github Enterprise Server” page, select “Amazon Web Services” in “GitHub in the Cloud” dropdown, then select appropriate region. Once selected, it will specify an AMI ID of GitHub Enterprise instance.

Setting up GitHub Enterprise Server on AWS

Now navigate to the AWS Management Console and launch an instance with the AMI ID provided by GitHub enterprise. Make sure to use powerful instance type having at least 32Gb of memory and 200gb of storage.

Make sure to open port 8443 and 122 inbound from the security group.
Once instance is launched, navigate to http:///8443
Follow the prompts to configure your GitHub Enterprise Server.
You will need to provide details like the license file, admin username and password, and instance URL.
Set up DNS records for your GitHub Enterprise instance to use a fully qualified domain name (FQDN). Configure your domain to point to the public IP address of your instance. (Optional)
You will also have to configure global settings like SMTP for email notifications and authentication using LDAP, SAML, or OAuth.
Navigate to the admin console at https:///admin. Create organizations, teams, and repositories as needed.

Migrating from AWS CodeCommit to GitHub Enterprise

Ready to consolidate your code under one roof? Let’s migrate your existing AWS CodeCommit repository to your newly minted GitHub Enterprise instance.

Initial Setup

To migrate repository from AWS CodeCommit to Github Enterprise, create two repositories:

  • “repository A” in AWS CodeCommit
  • “repository B” in Github Enterprise


Our goal is to migrate the contents repository A to repository B
Ensure you have the AWS CLI configured and CodeCommit credentials ready.

Repository Migration

Copy the https Clone url from CodeCommit repository and use the git clone command to clone the repository to your local machine.

git clone <CodeCommit clone URL>

Enter CodeCommit credentials we have generated earlier.

Navigate to the repository using cd command

Now navigate to the GitHub Enterprise tab and copy the clone URL.

In your terminal, add GitHub Enterprise as a remote repository using git remote add.

git remote add github https://<your-domain>/<organization>/<repo-name>.git

Push all branches and tags to GitHub Enterprise using the commands below

git push -u github --all
git push -u github --tags

Finally, head back to repository “B” in your GitHub Enterprise interface and refresh the page. You should see all the content and commit messages from your migrated repository!

Conclusion

Congratulations! You’ve successfully installed and configured GitHub Enterprise Server on AWS and migrated your code from AWS CodeCommit. Now you have a secure, self-hosted platform for your version control needs. Embrace the benefits of GitHub Enterprise’s advanced features and tailored security settings, all while maintaining complete control over your code infrastructure. Happy coding!

 

Leave a Reply

Your email address will not be published.