Nextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).
+
Nextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).
Instructions
First, we need to obtain a shell prompt by ssh-ing (remote machines or local machines) or just logging in (local machines). A traditional ssh might look like this if the domain you wished to ssh into is landchad.net:
diff --git a/pix/nextcloud-logo.png b/pix/nextcloud-logo.png
deleted file mode 100644
index 67d6591..0000000
Binary files a/pix/nextcloud-logo.png and /dev/null differ
diff --git a/pix/nextcloud.svg b/pix/nextcloud.svg
new file mode 100644
index 0000000..6f2e1a3
--- /dev/null
+++ b/pix/nextcloud.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
--
cgit v1.2.3
From 20b930c363d3dbc41bac0d9b9b5d251c49137d9d Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 30 Jun 2021 16:56:38 -0400
Subject: autodeploy on push
---
.github/workflows/upload.yml | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 .github/workflows/upload.yml
diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml
new file mode 100644
index 0000000..a6c9260
--- /dev/null
+++ b/.github/workflows/upload.yml
@@ -0,0 +1,32 @@
+name: CI
+
+# Controls when the action will run.
+on:
+ # Triggers the workflow on push to master (including merged PRs)
+ push:
+ branches: [ master ]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ update:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Updating website.
+ uses: appleboy/ssh-action@master
+ with:
+ host: landchad.net
+ username: chad
+ key: ${{ secrets.chad_ssh }}
+ passphrase: ${{ secrets.chad_pass }}
+ port: 22
+ script: |
+ cd landchad
+ git stash
+ git pull --force origin master
--
cgit v1.2.3
From 2152b1ec45eae26fa669d9a08100357cc3af892f Mon Sep 17 00:00:00 2001
From: Marcin Chrzanowski
Date: Wed, 30 Jun 2021 22:57:50 +0200
Subject: Add git hosting tutorial
---
git.html | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index.html | 1 +
2 files changed, 187 insertions(+)
create mode 100644 git.html
diff --git a/git.html b/git.html
new file mode 100644
index 0000000..ca9ba75
--- /dev/null
+++ b/git.html
@@ -0,0 +1,186 @@
+
+
+
+ Hosting Your Own Git Repositories – LandChad.net
+
+
+
+
+
+
+
+
Hosting Your Own Git Repositories
+
+
+
+ Once you have your own VPS or other Internet-available server, you can
+ start hosting your own git repositories. The goal of this tutorial is
+ for you to go from
+
+
git clone github.com/...
+
+ to
+
+
git clone YourLandChadDomainName.xyz/...
+
+ so you can cultivate your own homegrown, grass fed code, rather than
+ relying on a centralized proprietary service like GitHub.
+
+
+
What's not included in this tutorial
+
+
+
+ We will not set up a web front end. Your only interaction with
+ these repos will be via the git command line tool.
+
+
+ We will not support multiple users. It's expected only you, the
+ server owner, have write access to these repos.
+
+
+
+
Installing git
+
+
+ You most likely already have it installed on your server, but if not,
+ run
+
+
apt install git
+
+ We don't need any additional software, git itself ships
+ with everything needed to host a remote repository!
+
+
+
Creating bare repositories
+
+
+ For each repository you want to host, you will need to manually create
+ what's called a "bare" repository on your server. These hold all the
+ commits and any other git data needed for your repository, but without
+ an expanded "index" in which you can just browse all the files of a
+ certain commit in the file system.
+
+
+
+ These repositories need to be owned by the git user, and
+ you should probably pick a directory where you will store them all. One
+ sane choice is under /srv/git/, and we will use this as the
+ example directory for the rest of the tutorial, but any other path will
+ do as well.
+
+
+
Become the git user and create the directory
+
+
+ If you're logged in to your server as root and have git
+ installed, you can become the git user by executing
+
+
su git
+
+ Now navigate to/create your desired directory, for example
+
+
+cd /srv
+mkdir git
+
+
+
Create the repo
+
+
+ Now you can create the bare repository with
+
+
+
git init --bare my-repo.git
+
+ By convention, bare repository names end with ".git".
+
+
+
+ Repeat the above command for any other repositories you want to host.
+
+
+
Syncing local repositories with your server
+
+
Set up SSH login for the git user
+
+
+ You will need to be able to login remotely via ssh as the
+ git user we've used before. To do this, you will either
+ need to set up a password for the git user with
+
+
passwd git
+
+ or copy your public SSH key from your local machine to
+ /home/git/.ssh/authorized_keys.
+
+
+
Syncing a new repository with your server
+
+ If you've just created a new repository on your local machine, you will
+ need to tell git where the remote repository is to be able
+ to sync with it (using commands like git push or
+ git pull). We do this by defining a "remote" for your
+ repository.
+
+
+
+ A remote is just a named URL remembered in your repo's configuration. So
+ we need a name and a URL. By convention, the "main" remote is called
+ "origin". The URL has the format user@host:path, where
+
+
+
+ user is git, the git user
+ we've already worked with before.
+
+
+ host is a DNS hostname pointing to your server.
+ Alternatively you could even use your server's raw IP address.
+
+
+ path is the absolute path to the repository on the
+ server, in our example /srv/git/my-repo.git
+
+
+ Now you'll be able to run git push origin master to push
+ your commits or git pull origin to pull from the remote.
+
+
+
Syncing an existing repository
+
+
+ If you've already set up your local repository to sync with a service
+ like GitHub it probably already has a remote called "origin". You can
+ see your repo's remotes with
+
+
git remote -v
+
+ You can follow the above instructions, substituting an arbitrary other
+ name other than "origin" to create a differently named remote, e.g.
+
+
git remote add vps git@...
+
+ Now you'll be able to push/pull with git push vps master
+ and git pull vps, respectively.
+
+
+
+ Or, to completely sever ties with your centralized git provider, first
+ remove the original origin with
+
+
git remote remove origin
+
+ and then follow the instructions as above.
+
+
+
+
+
diff --git a/index.html b/index.html
index a75332e..06286fa 100644
--- a/index.html
+++ b/index.html
@@ -58,6 +58,7 @@
Once you have your own VPS or other Internet-available server, you can
start hosting your own git repositories. The goal of this tutorial is
- for you to go from
+ for you to go from
git clone github.com/...
- to
+
to
git clone YourLandChadDomainName.xyz/...
- so you can cultivate your own homegrown, grass fed code, rather than
+
+ so you can cultivate your own homegrown, grass-fed code, rather than
relying on a centralized proprietary service like GitHub.
-
What's not included in this tutorial
-
-
-
- We will not set up a web front end. Your only interaction with
- these repos will be via the git command line tool.
-
-
- We will not support multiple users. It's expected only you, the
- server owner, have write access to these repos.
-
-
-
Installing git
You most likely already have it installed on your server, but if not,
- run
+ run:
apt install git
+
We don't need any additional software, git itself ships
with everything needed to host a remote repository!
@@ -75,24 +64,27 @@
If you're logged in to your server as root and have git
installed, you can become the git user by executing
+
su git
+
Now navigate to/create your desired directory, for example
+
-
-cd /srv
-mkdir git
-
+
cd /srv
+mkdir git
Create the repo
Now you can create the bare repository with
+
git init --bare my-repo.git
+
By convention, bare repository names end with ".git".
@@ -107,12 +99,12 @@ mkdir git
You will need to be able to login remotely via ssh as the
git user we've used before. To do this, you will either
- need to set up a password for the git user with
-
-
passwd git
-
+ need to set up a password for the git user by running
+ passwd git,
or copy your public SSH key from your local machine to
/home/git/.ssh/authorized_keys.
+ See the SSH keys instructional for details
+ (just log in as git instead of root).
Syncing a new repository with your server
@@ -127,7 +119,8 @@ mkdir git
A remote is just a named URL remembered in your repo's configuration. So
we need a name and a URL. By convention, the "main" remote is called
- "origin". The URL has the format user@host:path, where
+ "origin". The URL has the format user@host:path, where:
+
@@ -135,7 +128,7 @@ mkdir git
we've already worked with before.
- host is a DNS hostname pointing to your server.
+ host is your domain name.
Alternatively you could even use your server's raw IP address.
@@ -146,10 +139,12 @@ mkdir git
- So, to create a new remote, run
+ So, to create a new remote, run:
+
Now you'll be able to run git push origin master to push
your commits or git pull origin to pull from the remote.
@@ -159,25 +154,27 @@ mkdir git
If you've already set up your local repository to sync with a service
like GitHub it probably already has a remote called "origin". You can
- see your repo's remotes with
+ see your repo's remotes with:
+
git remote -v
+
You can follow the above instructions, substituting an arbitrary other
name other than "origin" to create a differently named remote, e.g.
+
git remote add vps git@...
+
Now you'll be able to push/pull with git push vps master
and git pull vps, respectively.
Or, to completely sever ties with your centralized git provider, first
- remove the original origin with
-
-
git remote remove origin
-
+ remove the original origin with:
+ git remote remove origin
and then follow the instructions as above.
diff --git a/index.html b/index.html
index 06286fa..7c3b9ab 100644
--- a/index.html
+++ b/index.html
@@ -58,8 +58,8 @@
Once you have your own VPS or other Internet-available server, you can
start hosting your own git repositories. The goal of this tutorial is
diff --git a/index.html b/index.html
index 7c3b9ab..f6803ea 100644
--- a/index.html
+++ b/index.html
@@ -45,6 +45,20 @@
Nextcloud is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).