{"id":63315,"date":"2020-11-19T13:56:37","date_gmt":"2020-11-19T18:56:37","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=63315"},"modified":"2025-02-05T23:12:57","modified_gmt":"2025-02-06T04:12:57","slug":"git-server","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/","title":{"rendered":"How to Create Your Own Git Server"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png\" alt=\"Set up your own git server, super easy | InMotion Hosting\" class=\"wp-image-63317\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p> There are <a href=\"https:\/\/git.wiki.kernel.org\/index.php\/GitHosting\" target=\"_blank\" rel=\"noopener noreferrer\">so many Git hosting sites<\/a>  out there, including the popular <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a>,  which acts as a hub for thousands of software projects.  But for one reason or another, hosting your own Git repository may be preferable.  In this article, you\u2019ll learn exactly how to do that on your own <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">VPS Hosting<\/a> account. But any <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/fast-vps\">fast VPS hosting<\/a> account will work just fine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"custom-git-server\"><a id=\"org8dd804e\"><\/a><a id=\"ID-9a9f2378-de5f-4180-ab71-62d19b4c5583\"><\/a>Why Create Your Own Git Server?<\/h2>\n\n\n\n<dl class=\"org-dl\">\n<dt>Improved security<\/dt><dd>GitHub, and other services, provide good\nprotective parameters but accidents can happen, and have happened in the past. In general, having any sensitive data on third-party servers should be avoided where possible.<\/dd>\n<dt>More control<\/dt><dd>Managing your Git server means you can customize and optimize the hosting environment for your needs specifically.  Many of the premium options you get on your own server for free will cost you extra on a hosted service.<\/dd>\n<dt>More options<\/dt><dd>There\u2019s no reason why you can\u2019t do a combination of both. If someone on your team wants to host their part of the project on GitHub, or another service, they\u2019re free to do that.  Git is decentralized. You can have multiple remote repository locations.<\/dd>\n<\/dl>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"git-using-ssh\"><a id=\"orgb8805a5\"><\/a><a id=\"ID-42273c62-9af6-4c8c-a30a-44c790a3ab96\"><\/a>Managing SSH Keys<\/h2>\n\n\n\n<p>As mentioned above, your self-hosted Git installation is more secure than most services because your cloud VPS comes pre-loaded with significant SSH security measures. <\/p>\n\n\n\n<p>Using SSH keys for interacting with Git means you don\u2019t have to manage passwords. If you have a team member who wants to contribute to the project, you can simply upload their public key to the Git server.  When their work is done, or they are no longer contributing to the project, all you have to do is remove their key and they will no longer have access to the server. <\/p>\n\n\n\n<p>\nYou can also use HTTP to access remote repositories, but this will require more customization on your cloud VPS, and may introduce security risks.  (If you\u2019re interested in using HTTP instead of SSH, contact our <a href=\"https:\/\/www.inmotionhosting.com\/managed-hosting\">managed hosting<\/a> team and they will help you configure this kind of access.) \n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"theory\"><a id=\"org114fb92\"><\/a><a id=\"ID-bcdd21b1-4a59-49db-833e-ca0eed9591f0\"><\/a>How the Process Works<\/h2>\n\n\n\n<p> Here is the basic rundown of the Git server process: <\/p>\n\n\n\n<ul class=\"wp-block-list org-ul\">\n<li>Create a \u201cgit\u201d user and group<\/li>\n\n\n\n<li>Upload a public SSH key to the \u201cgit\u201d user which will allow you (or others) to log in as the \u201cgit\u201d user<\/li>\n\n\n\n<li>Create a bare repository on the server<\/li>\n\n\n\n<li>Add the remote repository (the one just created on the server) to a local Git project<\/li>\n\n\n\n<li>Push changes to the remote repository<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"git-user\"><a id=\"org21dea72\"><\/a><a id=\"ID-7db24a8f-49ed-430d-a80f-1996a8e1904b\"><\/a>The Theory Behind the Git User Account<\/h3>\n\n\n\n<p> <b>Why create a \u201cgit\u201d Linux user?  Can you just use \u201croot\u201d?<\/b> The git user is required because we will be pushing content to our server using SSH. In order to log in with SSH, a user is required.  You could use the <code>root<\/code> user, but this poses a security hazard.  It\u2019s considered a best practice to limit access to your <code>root<\/code> user account.  By creating a specialized git user for this process, you could\u2014if needed\u2014open your project to more contributors without granting access to the root user account.  The git user account only has access to its own files. This way, another contributor, logged in as git, cannot make changes to your server or engage in any unwanted activity. <\/p>\n\n\n\n<p> It might seem like an unnecessary extra step, but rest assured it is very important to create this additional Linux user on your server to manage Git remotely. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"file-path\"><a id=\"org5c4d8e3\"><\/a><a id=\"ID-ca76800c-3f98-4255-818e-349241fd3058\"><\/a>File Path<\/h2>\n\n\n\n<p> Before you create your first remote Git repository, you need to decide what file path you will save your repositories to. You can save repositories to different file paths, but it\u2019s generally easier to have all of them in one directory. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"user-setup\"><a id=\"org86dfd9b\"><\/a><a id=\"ID-b37c5fd0-6d96-4ce3-a665-fd71c8fb69ff\"><\/a>Creating the \u201cGit\u201d User<\/h2>\n\n\n\n<p>\nFirst things first, it\u2019s time to create a \u201cgit\u201d user account with\nwhich to do all your git-related work.  Remember, you can title this\nuser account anything you want.  Naming the account \u201cgit\u201d is merely a\nsimple way to indicate what this user account was created to do.\n<\/p>\n\n\n\n<p class=\"alert alert-info\">Remember, as you are logging into your cloud VPS account, you are using the root user.  If you are not using your root user, you will need to prepend these commands with \u201csudo.\u201d\n<\/p>\n\n\n\n<p> Create the Git user with the <code>adduser<\/code> command: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">adduser git<\/pre>\n\n\n\n<p>\nAnswer the questions as you are prompted, or press <kbd>Enter<\/kbd> to skip over them.  These questions are not required.  For the password, you can put virtually anything, because you will not be using passwords to log into this user.  Remember that password authentication is not allowed on your server by default.\n<\/p>\n\n\n\n<p>\nNow that you have created the git user, you can assume the role by using the <code>su<\/code> command:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">su git<\/pre>\n\n\n\n<p>\nYou will now need to create a <code>.ssh<\/code> directory in the \u201chome\u201d folder for the git user.  In order to do that, you must make sure you are in the home directory, so run a <code>cd<\/code> command to make sure:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd<\/pre>\n\n\n\n<p>\nNow, create the <code>.ssh<\/code> directory:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir .ssh<\/pre>\n\n\n\n<p>\nNext, make the directory only accessible by the git user:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod 700 .ssh<\/pre>\n\n\n\n<p>\nNow you have an <code>.ssh<\/code> directory to hold your \u201cauthorized_keys\u201d file, which is used to authenticate login requests.  It\u2019s time to create that file now:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">touch .ssh\/authorized_keys<\/pre>\n\n\n\n<p>\nAnd, likewise, adjust the privileges to make the file accessible only\nto the git user:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod 600 .ssh\/authorized_keys<\/pre>\n\n\n\n<p>\nNow, you have the directory and file necessary to set up the SSH\nlogins.\n<\/p>\n\n\n\n<p>\nBut before we move on, make sure that the \u201cgit\u201d group is allowed to\nauthenticate this way.\n<\/p>\n\n\n\n<p>\nYou can do that by <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/cloud-server\/ssh-security-sftp-ubuntu-cloud-server\/\">editing your SSH configuration<\/a> and adding \u201cgit\u201d to the acceptable groups listed in the configuration file.\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"keys-upload\"><a id=\"org3fbeba9\"><\/a><a id=\"ID-4fd08e83-c5bb-4ade-9b32-46816c7c2cc5\"><\/a>Uploading Keys to the Git User<\/h3>\n\n\n\n<p>\nWhen you hear about \u201cuploading\u201d or \u201cmanaging\u201d keys, you are basically\n<i>appending<\/i> these keys to the <code>.ssh\/authorized_keys<\/code> file.  You can put as many public keys as you need in this file, and there are a few different ways to get to them there.\n<\/p>\n\n\n\n<p>\nOne way is to simply copy and paste the key from your local computer to the server.\n<\/p>\n\n\n\n<p>\nThere is also an SSH command that will copy the key to the server for\nyou:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh-copy-id -i ~\/.ssh\/key user@<span style=\"color:red;\">&lt;hostname, IP address, or domain name&gt;<\/span>\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"bare-git-repo\"><a id=\"org39d0586\"><\/a><a id=\"ID-7e1fab02-fdcd-4e7a-9655-0bf936569a03\"><\/a>Creating the \u201cBare\u201d Git Repositories<\/h2>\n\n\n\n<p> Once you\u2019ve decided which directory will house your remote repositories, you can start creating repositories first as directories ending with a <code>.git<\/code> extension.  The extension is important, as it distinguishes the directories containing Git repositories from regular directories. <\/p>\n\n\n\n<p>\nFor example, to create a repository called \u201cwebsite,\u201d create a directory like so:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir website.git<\/pre>\n\n\n\n<p>\nThen, enter the directory with the <code>cd<\/code> command:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd website.git<\/pre>\n\n\n\n<p> Once inside the directory, create a \u201cbare\u201d Git repository: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git init --bare<\/pre>\n\n\n\n<p> Now, when you add <code>website.git<\/code> as a remote repository (as you\u2019ll see how below) Git will be able to recognize it. <\/p>\n\n\n\n<p> Creating the <code>--bare<\/code> git repository basically means you are telling Git, \u201cThere is nothing in this repository yet, but I want this directory (<code>website.git<\/code>) to function as a remote repository. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-repo\"><a id=\"orgd4d0781\"><\/a><a id=\"ID-faa7cd1b-5b57-4497-a23e-3e298a57a5bc\"><\/a>Add Your Remote Repository<\/h2>\n\n\n\n<p>\nSo far, you have created a git user account, a bare repository in the\ndirectory of your choice, and you have SSH key authentication set up\nfor the git user.\n<\/p>\n\n\n\n<p> Now, you just need to make your local Git installation aware of the new repository: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git remote add origin git@server:\/path\/to\/website.git<\/pre>\n\n\n\n<p>\nLet us break this command a little bit.\n<\/p>\n\n\n\n<p>\nThe <code>git remote add<\/code> command initiates the addition of a repository. The \u201corigin\u201d part names the new repository.  You can put any name you want, you don\u2019t have to use \u201corigin,\u201d but it is merely a conventional naming scheme.\n<\/p>\n\n\n\n<p> The rest of the command specifies the precise server file path to the bare Git repository you created. <\/p>\n\n\n\n<p>\nThe final step is to push your project to the new repository.  For\nexample, if you are pushing the \u201cmaster\u201d branch, the command will look\nlike this:\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git push origin master<\/pre>\n\n\n\n<p> That\u2019s it!  You now know how to create your own Git repository on a private server. <\/p>\n\n\n\n<p>\nWhile you\u2019re here, you may also be interested to know how you can\n<a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/using-git-to-publish-files\/\">\u201ccheckout\u201d (or, basically copy) files from your repository to a specific directory on your server<\/a>.  This is a great way to publish files to a document root or specific directory on your website.\n<\/p>\n\n\n\n<p>Learn more from our <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/\">VPS Hosting Product Guide<\/a>.<\/p>\n\n\n<div class=\"jumbotron\" style=\"text-align:center;\">\r\n<p style=\"font-size: 20px;\"><strong>Scalable VPS Infrastructure, Fully Managed<\/strong><\/p>\r\n<p>When shared hosting can't handle your traffic, VPS delivers dedicated resources that scale with demand. Our team manages the technical complexity while you manage your business.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>NVMe Storage &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>High-Availability &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Ironclad Security &nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Premium Support<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=vps-cta2\">VPS Hosting<\/a><\/p>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are so many Git hosting sites out there, including the popular GitHub, which acts as a hub for thousands of software projects. But for one reason or another, hosting your own Git repository may be preferable. In this article, you&#8217;ll learn exactly how to do that on your own VPS Hosting account. But any<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4309],"tags":[],"class_list":["post-63315","post","type-post","status-publish","format-standard","hentry","category-git"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create Your Own Git Server | Complete Guide<\/title>\n<meta name=\"description\" content=\"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It&#039;s the best way to host git, and you will be happy with the results.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Your Own Git Server | Complete Guide\" \/>\n<meta property=\"og:description\" content=\"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It&#039;s the best way to host git, and you will be happy with the results.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-19T18:56:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-06T04:12:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"How to Create Your Own Git Server\",\"datePublished\":\"2020-11-19T18:56:37+00:00\",\"dateModified\":\"2025-02-06T04:12:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\"},\"wordCount\":1341,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png\",\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\",\"name\":\"How to Create Your Own Git Server | Complete Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png\",\"datePublished\":\"2020-11-19T18:56:37+00:00\",\"dateModified\":\"2025-02-06T04:12:57+00:00\",\"description\":\"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It's the best way to host git, and you will be happy with the results.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create Your Own Git Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create Your Own Git Server | Complete Guide","description":"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It's the best way to host git, and you will be happy with the results.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Create Your Own Git Server | Complete Guide","og_description":"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It's the best way to host git, and you will be happy with the results.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-11-19T18:56:37+00:00","article_modified_time":"2025-02-06T04:12:57+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png","type":"","width":"","height":""}],"author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"How to Create Your Own Git Server","datePublished":"2020-11-19T18:56:37+00:00","dateModified":"2025-02-06T04:12:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/"},"wordCount":1341,"commentCount":6,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png","articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/","name":"How to Create Your Own Git Server | Complete Guide","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server-1024x538.png","datePublished":"2020-11-19T18:56:37+00:00","dateModified":"2025-02-06T04:12:57+00:00","description":"Creating your own git server is the best way to ensure maximum security. Doing so on your own VPS sweetens the pot even further. It's the best way to host git, and you will be happy with the results.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/11\/git_server.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/git-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Create Your Own Git Server"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4309,"name":"Git","slug":"git","link":"https:\/\/www.inmotionhosting.com\/support\/website\/git\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/63315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=63315"}],"version-history":[{"count":16,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/63315\/revisions"}],"predecessor-version":[{"id":129257,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/63315\/revisions\/129257"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=63315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=63315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=63315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}