{"id":13256,"date":"2025-12-20T11:08:59","date_gmt":"2025-12-20T05:38:59","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=13256"},"modified":"2025-12-24T16:18:05","modified_gmt":"2025-12-24T10:48:05","slug":"use-git-on-linux","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/use-git-on-linux","title":{"rendered":"How to Use Git on Linux Server with SSH Keys and Permissions"},"content":{"rendered":"\n<p><strong>To use Git on a Linux server<\/strong>, install Git via your package manager, configure your identity, create a dedicated git user with SSH keys, initialize a bare repository, and push from your local machine. Optionally add a post-receive hook to deploy code. This setup enables secure, collaborative version control and automated deployments.<\/p>\n\n\n\n<p>Learning how to use Git on Linux server unlocks reliable version control, collaboration, and automated deployments for your applications. In this guide, I\u2019ll walk you through installing Git, configuring <a href=\"https:\/\/www.youstable.com\/blog\/use-ssh-on-linux\/\">secure SSH access<\/a>, creating a central bare repository, and setting up simple CI\/CD with hooks\u2014using clear, production-tested steps you can follow on any modern Linux distribution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-is-git-and-why-use-it-on-a-linux-server\"><strong>What is Git and Why Use it on a Linux Server?<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-media-text has-media-on-the-right is-stacked-on-mobile\"><div class=\"wp-block-media-text__content\">\n<p>Git is a distributed version control system that tracks file changes and enables teams to collaborate safely. Hosting Git on a Linux server gives you control over access, storage, and automation. It\u2019s ideal for in-house repositories, private projects, and zero-downtime deployments\u2014without relying on third-party platforms if you don\u2019t want to.<\/p>\n<\/div><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"1168\" height=\"784\" src=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/What-Is-Git-and-Why-Use-It-on-a-Linux-Server.png\" alt=\"What Is Git and Why Use It on a Linux Server?\" class=\"wp-image-13572 size-full\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/What-Is-Git-and-Why-Use-It-on-a-Linux-Server.png 1168w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/What-Is-Git-and-Why-Use-It-on-a-Linux-Server-150x101.png 150w\" sizes=\"auto, (max-width: 1168px) 100vw, 1168px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"search-intent-and-what-youll-learn\"><strong>Search Intent and What You\u2019ll Learn<\/strong><\/h2>\n\n\n\n<p>This tutorial focuses on practical setup: installing Git, securing SSH, creating a shared \u201cbare\u201d repository, pushing from local, and deploying code via hooks. You\u2019ll also see common workflows, troubleshooting, and best practices used on real servers at scale.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"prerequisites\"><strong>Prerequisites<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A Linux server (Ubuntu, Debian, AlmaLinux, Rocky Linux, or RHEL)<\/li>\n\n\n\n<li>Root or sudo access<\/li>\n\n\n\n<li>Basic command line familiarity<\/li>\n\n\n\n<li>OpenSSH server installed and reachable via SSH<\/li>\n\n\n\n<li>Git installed locally on your workstation<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"install-git-on-linux\"><strong>Install Git on Linux<\/strong><\/h2>\n\n\n\n<p>Use your distro\u2019s package manager for a stable, secure install.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"ubuntu-debian\"><strong>Ubuntu \/ Debian<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install -y git\ngit --version<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"almalinux-rocky-linux-rhel\"><strong>AlmaLinux \/ Rocky Linux \/ RHEL<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y git\ngit --version<\/code><\/pre>\n\n\n\n<p>If you need a newer Git than your repo provides, consider using the official backports or trusted software collections. Avoid compiling from source unless required for policy or features.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"configure-git-global-settings\"><strong>Configure Git (Global Settings)<\/strong><\/h3>\n\n\n\n<p>Set your identity once per server user and choose defaults that fit your workflow.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global user.name \"Your Name\"\ngit config --global user.email \"you@example.com\"\ngit config --global init.defaultBranch main\ngit config --global core.editor \"nano\"   # or \"vim\"\ngit config --global pull.rebase false    # safe default for beginners\n\n# Useful aliases\ngit config --global alias.st \"status -sb\"\ngit config --global alias.last \"log -1 --stat\"\ngit config --global alias.co checkout\ngit config --global alias.br branch<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"create-a-dedicated-git-user-and-enable-ssh-access\"><strong>Create a Dedicated Git User and Enable SSH Access<\/strong><\/h3>\n\n\n\n<p>Separate the Git service user from your personal account for security and clean permissions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># On the server\nsudo adduser --system --shell \/usr\/bin\/git-shell --group --home \/home\/git git\nsudo mkdir -p \/home\/git\/.ssh\nsudo touch \/home\/git\/.ssh\/authorized_keys\nsudo chown -R git:git \/home\/git\/.ssh\nsudo chmod 700 \/home\/git\/.ssh\nsudo chmod 600 \/home\/git\/.ssh\/authorized_keys<\/code><\/pre>\n\n\n\n<p>By setting the shell to git-shell, the user can run Git but not obtain an interactive shell\u2014an extra safety layer for a Git server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"generate-and-add-your-ssh-key\"><strong>Generate and Add Your SSH Key<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># On your local machine\nssh-keygen -t ed25519 -C \"you@example.com\"\nssh-copy-id -i ~\/.ssh\/id_ed25519.pub git@your-server-ip\n\n# Or manually copy the public key to:\n# \/home\/git\/.ssh\/authorized_keys (on the server)<\/code><\/pre>\n\n\n\n<p>After adding your key, test login:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh -T git@your-server-ip<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"create-a-central-bare-repository\"><strong>Create a Central \u201cBare\u201d Repository<\/strong><\/h3>\n\n\n\n<p>A bare repository stores Git data without a working directory. This is the canonical source you push to and pull from.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># On the server (as root\/sudo), prepare a repos directory\nsudo mkdir -p \/srv\/git\nsudo chown -R git:git \/srv\/git\n\n# Switch to git user\nsudo -u git -H bash -lc 'cd \/srv\/git &amp;&amp; mkdir myapp.git &amp;&amp; cd myapp.git &amp;&amp; git init --bare'<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"clone-and-push-from-your-local-machine\"><strong>Clone and Push from Your Local Machine<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># If you already have a local repo:\ncd \/path\/to\/your\/local\/myapp\ngit remote add origin ssh:\/\/git@your-server-ip\/srv\/git\/myapp.git\ngit push -u origin main\n\n# If starting fresh:\nmkdir myapp &amp;&amp; cd myapp\ngit init\necho \"# My App\" &gt; README.md\ngit add README.md\ngit commit -m \"Initial commit\"\ngit branch -M main\ngit remote add origin ssh:\/\/git@your-server-ip\/srv\/git\/myapp.git\ngit push -u origin main<\/code><\/pre>\n\n\n\n<p><strong>Team members granted keys can now clone:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone ssh:\/\/git@your-server-ip\/srv\/git\/myapp.git<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"deploy-automatically-with-a-post-receive-hook\"><strong>Deploy Automatically with a post-receive Hook<\/strong><\/h2>\n\n\n\n<p>For simple CI\/CD, use Git hooks to deploy after a push to main. This is a common pattern for staging or small production sites.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># On the server, create a deployment path owned by a deploy user\nsudo useradd -m -s \/bin\/bash deploy\nsudo mkdir -p \/var\/www\/myapp\nsudo chown -R deploy:deploy \/var\/www\/myapp\n\n# Add a post-receive hook to the bare repo\nsudo -u git -H bash -lc 'cat &gt;\/srv\/git\/myapp.git\/hooks\/post-receive' &lt;&lt;'EOF'\n#!\/usr\/bin\/env bash\nset -e\nread oldrev newrev ref\nbranch=$(echo \"$ref\" | sed \"s,refs\/heads\/,,\")\n\nif &#91; \"$branch\" = \"main\" ]; then\n  GIT_WORK_TREE=\/var\/www\/myapp git --git-dir=\/srv\/git\/myapp.git checkout -f main\n  chown -R deploy:deploy \/var\/www\/myapp\n  # Optional: build steps, e.g., npm ci &amp;&amp; npm run build\n  # Optional: systemctl reload nginx\nfi\nEOF\nsudo chmod +x \/srv\/git\/myapp.git\/hooks\/post-receive<\/code><\/pre>\n\n\n\n<p>Now, every push to main updates the working tree at \/var\/www\/myapp. Keep build tooling and secrets secure, and consider separate staging and production branches.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"common-git-workflows-on-a-linux-server\"><strong>Common Git Workflows on a Linux Server<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Feature branching: <\/strong>create topic branches locally, push, and merge into main.<\/li>\n\n\n\n<li><strong>Release tags: <\/strong>tag stable releases and deploy only tags to production.<\/li>\n\n\n\n<li><strong>Hotfix branches: <\/strong>branch off the current release, fix, tag, and merge back.<\/li>\n\n\n\n<li><strong>Protected branches: <\/strong>restrict write access to main on the server (via permissions or tooling like Gitolite\/Gitea).<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Typical flow\ngit checkout -b feature\/login\ngit commit -m \"Add login form\"\ngit push -u origin feature\/login\n# Review\/merge, then:\ngit checkout main\ngit merge --no-ff feature\/login\ngit push<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"manage-users-and-access\"><strong>Manage Users and Access<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SSH keys: <\/strong>add each user\u2019s public key to \/home\/git\/.ssh\/authorized_keys.<\/li>\n\n\n\n<li><strong>Per-repo permissions: <\/strong>create group-per-repo and use filesystem permissions if you want read-only vs read-write separation.<\/li>\n\n\n\n<li><strong>git-shell: <\/strong>limits users to Git operations only, reducing risk.<\/li>\n\n\n\n<li><strong>Advanced:<\/strong> consider Gitolite (fine-grained ACLs), Gitea or GitLab (web UI, issues, CI\/CD).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"security-best-practices\"><strong>Security Best Practices<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disable password SSH logins; allow keys only (sshd_config: PasswordAuthentication no).<\/li>\n\n\n\n<li>Use fail2ban and a firewall (ufw or firewalld) to limit SSH attempts.<\/li>\n\n\n\n<li>Back up \/srv\/git and \/home\/git\/.ssh regularly and test restores.<\/li>\n\n\n\n<li>Keep Git, OpenSSH, and the OS patched.<\/li>\n\n\n\n<li>Use separate deploy keys with limited scope.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"backup-and-maintenance\"><strong>Backup and Maintenance<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Simple backup: <\/strong>archive the bare repositories directory and keys.<\/li>\n\n\n\n<li><strong>Health:<\/strong> run git gc periodically to optimize storage.<\/li>\n\n\n\n<li><strong>Monitoring: <\/strong>watch disk I\/O and inode usage if hosting many repos.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Backup all repos\nsudo tar -czf \/backup\/git-$(date +%F).tar.gz \/srv\/git \/home\/git\/.ssh\n\n# Optimize a repo\nsudo -u git -H bash -lc 'git --git-dir=\/srv\/git\/myapp.git gc --aggressive --prune=now'<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"troubleshooting-common-errors\"><strong>Troubleshooting Common Errors<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"permission-denied-publickey\"><strong>Permission denied (publickey)<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure your public key is present in \/home\/git\/.ssh\/authorized_keys.<\/li>\n\n\n\n<li><strong>Fix permissions:<\/strong> .ssh (700), authorized_keys (600), home dir not group-writable.<\/li>\n\n\n\n<li>Test with ssh -v git@server to see key negotiation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"non-fast-forward-updates-were-rejected\"><strong>non-fast-forward updates were rejected<\/strong><\/h3>\n\n\n\n<p>This means the remote has new commits. Pull and merge or rebase, then push.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git pull --rebase origin main\ngit push origin main<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"detached-head-or-wrong-branch-deployed\"><strong>Detached HEAD or wrong branch deployed<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure your post-receive hook checks out a specific branch (main).<\/li>\n\n\n\n<li>Verify GIT_WORK_TREE is set correctly in the hook.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"best-practices-for-teams\"><strong>Best Practices for Teams<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Adopt a branching model (Git Flow or trunk-based) and stick to it.<\/li>\n\n\n\n<li>Write atomic commits with clear messages and meaningful PR descriptions.<\/li>\n\n\n\n<li>Use .gitignore to avoid committing secrets, build artifacts, and OS files.<\/li>\n\n\n\n<li>Store secrets outside Git; use environment variables or a secrets manager.<\/li>\n\n\n\n<li>Automate tests and linting pre-deploy; start with simple hooks and grow into CI\/CD.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"self-hosted-git-vs-managed-platforms\"><strong>Self-Hosted Git vs. Managed Platforms<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Self-hosted (this guide):<\/strong> full control, simple, private, minimal dependencies.<\/li>\n\n\n\n<li>Gitea\/GitLab: adds web UI, permissions, issues, CI\/CD, code review.<\/li>\n\n\n\n<li><strong>GitHub\/Bitbucket\/GitLab.com:<\/strong> zero maintenance, global availability, integrations.<\/li>\n<\/ul>\n\n\n\n<p>If you want a fast, secure VPS tailored for Git and deployment, YouStable offers SSD-powered Linux servers with root access, dedicated IPv4, and data center choices. You can spin up a clean instance, follow this guide, and be production-ready in minutes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"keyword-focused-recap\"><strong>Keyword-Focused Recap<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Git on Linux with apt or dnf and configure your identity.<\/li>\n\n\n\n<li>Create a git user, <a href=\"https:\/\/www.youstable.com\/blog\/ssh-keys-vs-password-authentication\/\">secure SSH keys<\/a>, and initialize a bare repository.<\/li>\n\n\n\n<li>Push from local, pull to servers, and automate deployment with hooks.<\/li>\n\n\n\n<li>Follow security, backup, and maintenance best practices to keep Git stable.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs\"><strong>FAQs<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765797397179\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-install-git-on-ubuntu-or-debian-server\"><strong>How do I install Git on Ubuntu or Debian server?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Run sudo apt update &amp;&amp; sudo apt install -y git, then verify with git &#8211;version. Configure your identity with git config &#8211;global user.name and user.email. For newer versions, consider official backports or trusted PPAs.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797411803\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-is-a-bare-repository-and-when-should-i-use-it\"><strong>What is a bare repository and when should I use it?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>A bare repository contains Git data only (no working tree) and acts as the central source of truth on your server. Teams push to this repo and clone from it. Use it whenever multiple developers collaborate via a server-hosted Git remote.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797425370\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-can-i-deploy-code-automatically-after-a-git-push\"><strong>How can I deploy code automatically after a git push?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Add a post-receive hook in the bare repo to checkout a branch into your web root (via GIT_WORK_TREE) and run build or reload commands. This creates a lightweight <a href=\"https:\/\/www.youstable.com\/blog\/what-is-ci-cd-on-linux-server\/\">CI\/CD pipeline<\/a> without extra tools.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797439208\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-fix-permission-denied-publickey-when-pushing\"><strong>How do I fix \u201cPermission denied (publickey)\u201d when pushing?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Ensure your public key is in \/home\/git\/.ssh\/authorized_keys, permissions are correct (700 for .ssh, 600 for authorized_keys), and that you\u2019re using the right user and host. Test with ssh -v git@server for detailed logs.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797452181\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"should-i-self-host-git-or-use-github-gitlab\"><strong>Should I self-host Git or use GitHub\/GitLab?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Self-hosting offers privacy and control with minimal dependencies\u2014great for teams comfortable with Linux. Managed platforms provide rich features, integrations, and no server maintenance. Many teams start simple on a VPS and graduate to Gitea or GitLab as needs grow.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>To use Git on a Linux server, install Git via your package manager, configure your identity, create a dedicated git [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":15524,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[350],"tags":[],"class_list":["post-13256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Use-Git-on-Linux-Server-with-SSH-Keys-and-Permissions.jpg","author_info":{"display_name":"Sanjeet Chauhan","author_link":"https:\/\/www.youstable.com\/blog\/author\/sanjeet"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=13256"}],"version-history":[{"count":6,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13256\/revisions"}],"predecessor-version":[{"id":15525,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13256\/revisions\/15525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/15524"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=13256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=13256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=13256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}