Scrapbook

Scrapbook:

random stuffs

  • Tutorial works with this setup pc with linux + git installed set up the project enter your preferred project directory git clone https://edit.htgaa.org/my-username/webpages.git (replace my-username with your real username, or copied the full url from the website) check your directory add credential helper git config –local credential.helper store how it works: When you push from this directory, it will ask for your credentials one last time and save them to ~/.git-credentials. update webpages go to the root directory of the project then enter this command.

Subsections of Scrapbook

tutorial: Git push this website via terminal

cover image cover image

Tutorial

works with this setup

  • pc with linux + git installed

set up the project

  • enter your preferred project directory
  • git clone https://edit.htgaa.org/my-username/webpages.git (replace my-username with your real username, or copied the full url from the website)
  • check your directory
  • add credential helper
    • git config --local credential.helper store
    • how it works: When you push from this directory, it will ask for your credentials one last time and save them to ~/.git-credentials.

update webpages

go to the root directory of the project then enter this command.

git add .
git commit -m 'add content'
git push

then enter your username and password

remarks

  • It is recommended to remove the .git-credentials after finished with the project (when the course is finished) for security reasons.
  • rm ~/.git-credentials

Logs

  • my goal: edit this website via terminal or obsidian
  • problem1: ssh feature for edit.htgaa is not working
    • git clone ssh://git@edit.htgaa.org:2222/my-username/webpages.git
    • connection timeout
  • sol1: clone the repo via https
    • git clone https://edit.htgaa.org/my-username/webpages.git
  • now I can edit my website directly.
  • use this command to update the website.
    • git add .
    • git commit -m 'enter your message'
    • git push
  • problem2: I have to enter my longgggg username and password everytime I update the webpage
  • sol2: git credential helper (recommended by gemini)
    • git config --local credential.helper store
    • how it works: The next time you push from this directory, it will ask for your credentials one last time and save them to ~/.git-credentials.
  • remarks:
    • It is recommended to remove the .git-credentials after finished with the project for security reasons.
    • rm ~/.git-credentials