From 48b0a3c7933761457b5c639974e6592289efea4f Mon Sep 17 00:00:00 2001 From: Connor C Date: Fri, 4 Oct 2024 15:43:17 -0600 Subject: [PATCH] Add other_software/setup-gcm.sh --- other_software/setup-gcm.sh | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 other_software/setup-gcm.sh diff --git a/other_software/setup-gcm.sh b/other_software/setup-gcm.sh new file mode 100644 index 0000000..d088326 --- /dev/null +++ b/other_software/setup-gcm.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Variables +GCM_DEB_URL="https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.0/gcm-linux_amd64.2.6.0.deb" +GCM_DEB_FILE="gcm-linux.deb" + +# Step 1: Update the system and install required packages +echo "Updating system and installing dependencies..." +sudo apt update +sudo apt install -y git curl + +# Step 2: Download Git Credential Manager +echo "Downloading Git Credential Manager from $GCM_DEB_URL..." +curl -L $GCM_DEB_URL -o $GCM_DEB_FILE + +# Step 3: Install the downloaded .deb package +echo "Installing Git Credential Manager..." +sudo dpkg -i $GCM_DEB_FILE + +# Step 4: Fix any broken dependencies (if necessary) +echo "Fixing any broken dependencies..." +sudo apt --fix-broken install -y + +# Step 5: Configure Git to use GCM as the credential helper +echo "Configuring Git to use GCM as the credential helper..." +git config --global credential.helper gcm + +# Step 6: Configure the credential store to use secretservice +echo "Configuring the credential store to use secretservice..." +git config --global credential.credentialStore secretservice + +# Step 7: Clean up downloaded .deb file +echo "Cleaning up downloaded files..." +rm -f $GCM_DEB_FILE + +# Step 8: Confirm setup +echo "Setup completed. Verifying installation..." +git-credential-manager --version + +# Final message +echo "Git Credential Manager is successfully installed and configured!" \ No newline at end of file