diff --git a/content/posts/git-server/index.md b/content/posts/git-server/index.md new file mode 100644 index 0000000..9980995 --- /dev/null +++ b/content/posts/git-server/index.md @@ -0,0 +1,23 @@ +--- +title: "How to setup git server on a VPS" +date: 2023-11-11T01:30:00+00:00 +--- + +1. First login to your VPS as root user +```sh +useradd -m git +su git +cd +mkdir .ssh && chmod 700 .ssh +touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys +``` + +2. Generate SSH key on your local machine +```sh +ssh-keygen -t ed25519 -C "your_email@example.com" +cat ~/.ssh/id_ed25519.pub | ssh USER@HOST "cat >> ~/.ssh/authorized_keys" +``` +To have interface for managing your repositories you can use [cgit](https://git.zx2c4.com/cgit/about/). +For more information about setting up git server you can read this articles: +[git website](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server) +[interface, frotend, tools for git](https://archive.kernel.org/oldwiki/git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools.html#Web_Interface) diff --git a/content/posts/pass/index.md b/content/posts/pass/index.md new file mode 100644 index 0000000..3844930 --- /dev/null +++ b/content/posts/pass/index.md @@ -0,0 +1,23 @@ +--- +title: "How to setup password-store in Linux" +date: 2023-11-11T01:30:00+00:00 +--- + +First download zbar pass pass-otp gnupg +1. gpg --full-gen-key # generate gpg key for encrypting password +2. pass init +3. pass add xxxx +4. pass xxxx # get password after entering passphrase of gpg key +pass ls # list out all password stored +passmenu [--type] # for dmenu, with --type it prints to shell + +For OTP: +Download the QR code of the OTP and run +```sh +zbarimg -q [img path] # copy the file content including the otpauth:// + +```sh +pass otp add xxxx # paste the file content +pass xxxx # give the otpauth:// +pass otp xxxx # give the otp +```