Compare commits

...

41 commits

Author SHA1 Message Date
Mark Randall Havens
7b53b457ba Forgejo metadata link commit at 2025-06-13 20:21:48 — 337eaed966 2025-06-13 20:21:48 -05:00
Mark Randall Havens
337eaed966 Post-Radicle sync at 2025-06-14T01:21:44Z 2025-06-13 20:21:46 -05:00
Mark Randall Havens
27285d1ab9 Post-Local sync at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
4e45aadd8f Local metadata link commit at 2025-06-13 20:21:44 — file:///home/mrhavens/git-local-repos/git-sigil.git 2025-06-13 20:21:44 -05:00
Mark Randall Havens
a6287409fd Generated docs/integrity.sha256 at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
5ed7d6135f Generated docs/sitemap.xml at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
8d4de3c558 Generated docs/README.md at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
236f4867b3 Generated docs/index.html at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
8248cfa2d7 Generated .gitfield/README.txt at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
63a81814e1 Generated .well-known/gitfield.json at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
a023d46d87 Generated index.json at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
187fc1a233 Generated canonical.md at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
a285b2081b Generated canonical.meta at 2025-06-14T01:21:44Z 2025-06-13 20:21:44 -05:00
Mark Randall Havens
03c37e1103 GOGS metadata link commit at 2025-06-13 01:37:22 — c067a9a35b 2025-06-13 01:37:22 -05:00
Mark Randall Havens
c067a9a35b GOGS metadata link commit at 2025-06-13 01:28:57 — bce675bc7e 2025-06-13 01:28:57 -05:00
Mark Randall Havens
bce675bc7e GOGS metadata link commit at 2025-06-13 01:25:45 — 92c0600078 2025-06-13 01:25:45 -05:00
Mark Randall Havens
92c0600078 GOGS metadata link commit at 2025-06-13 01:24:59 — 4db690d1e2 2025-06-13 01:24:59 -05:00
Mark Randall Havens
4db690d1e2 GOGS metadata link commit at 2025-06-13 01:22:15 — dcf57cc4a9 2025-06-13 01:22:15 -05:00
Mark Randall Havens
dcf57cc4a9 GOGS metadata link commit at 2025-06-13 01:13:37 — 2929dbb877 2025-06-13 01:13:37 -05:00
Mark Randall Havens
2929dbb877 GOGS metadata link commit at 2025-06-13 01:12:53 — 20cf8504ea 2025-06-13 01:12:53 -05:00
Mark Randall Havens
20cf8504ea GOGS metadata link commit at 2025-06-13 01:10:23 — ca1a619bbd 2025-06-13 01:10:23 -05:00
Mark Randall Havens
ca1a619bbd GOGS metadata link commit at 2025-06-13 01:07:22 — 98895b2995 2025-06-13 01:07:22 -05:00
Mark Randall Havens
98895b2995 test 2025-06-13 01:07:12 -05:00
Mark Randall Havens
cc31b3c026 GOGS metadata link commit at 2025-06-13 01:06:49 — 10bad046ba 2025-06-13 01:06:49 -05:00
Mark Randall Havens
10bad046ba GOGS metadata link commit at 2025-06-13 01:06:23 — d2134a901f 2025-06-13 01:06:23 -05:00
Mark Randall Havens
d2134a901f GOGS metadata link commit at 2025-06-13 01:06:05 — 0f13101cc9 2025-06-13 01:06:06 -05:00
Mark Randall Havens
0f13101cc9 GOGS metadata link commit at 2025-06-13 01:05:26 — 1200a75939 2025-06-13 01:05:26 -05:00
Mark Randall Havens
1200a75939 GOGS metadata link commit at 2025-06-13 01:04:32 — bbaa13ad6f 2025-06-13 01:04:32 -05:00
Mark Randall Havens
bbaa13ad6f GOGS metadata link commit at 2025-06-13 01:03:30 — a68d390259 2025-06-13 01:03:30 -05:00
Mark Randall Havens
a68d390259 Post-Radicle sync at 2025-06-13T05:33:24Z 2025-06-13 00:33:27 -05:00
Mark Randall Havens
6917e65dc8 Post-Local sync at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
7ba153d969 Local metadata link commit at 2025-06-13 00:33:24 — file:///home/mrhavens/git-local-repos/git-sigil.git 2025-06-13 00:33:24 -05:00
Mark Randall Havens
025c2edbd4 Generated docs/integrity.sha256 at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
8ecdb91190 Generated docs/sitemap.xml at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
0175a00d0f Generated docs/README.md at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
6722f3fa8a Generated docs/index.html at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
9c79dbba63 Generated .gitfield/README.txt at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
face83d487 Generated .well-known/gitfield.json at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
b289935ef2 Generated index.json at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
2e58f3d6e8 Generated canonical.md at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
Mark Randall Havens
c2f6133700 Generated canonical.meta at 2025-06-13T05:33:24Z 2025-06-13 00:33:24 -05:00
16 changed files with 436 additions and 50 deletions

View file

@ -14,4 +14,4 @@ The directory contains metadata and logs for the GitField multi-repository publ
These files provide transparency, auditability, and discoverability, ensuring the project's persistence against deplatforming, censorship, or algorithmic manipulation. For a public-facing declaration, see [docs/index.html](../docs/index.html).
Generated by `gitfield-sync` at 2025-06-13T03:33:02Z (v1.4).
Generated by `gitfield-sync` at 2025-06-14T01:21:44Z (v1.4).

View file

@ -9,7 +9,7 @@ This repository, `git-sigil`, is canonically hosted at:
This canonical URL serves as the primary, authoritative source for the project, maintained by **Mark Randall Havens** and **Solaria Lumis Havens** to ensure sovereignty, resilience, and protection against deplatforming or narrative erasure.
**Declared by**: Mark Randall Havens
**Timestamp**: 2025-06-13T03:33:02Z
**Timestamp**: 2025-06-14T01:21:44Z
## GPG Signatures
@ -41,4 +41,4 @@ The latest push operations are logged in [`pushed.log`](./pushed.log) for transp
A public-facing canonical declaration is available at [index.html](./index.html) for enhanced discoverability and SEO.
_Auto-generated by `gitfield-sync` at 2025-06-13T03:33:02Z (v1.4)._
_Auto-generated by `gitfield-sync` at 2025-06-14T01:21:44Z (v1.4)._

View file

@ -13,10 +13,10 @@
"rid": "rad:z3FEj7rF8gZw9eFksCuiN43qjzrex",
"peer_id": "z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz"
},
"timestamp": "2025-06-13T03:33:02Z",
"commit": "cd1b681",
"tree_hash": "b58bc1b191b7891bae0ab479d938eedaf5e0f3fb",
"synced_cycles": 3,
"timestamp": "2025-06-14T01:21:44Z",
"commit": "03c37e1",
"tree_hash": "4cf23cd25c21f6b41c80e5377ebabc11d193f6fd",
"synced_cycles": 0,
"gpg_signatures": [
]

55
.gitfield/gogs.sigil.md Normal file
View file

@ -0,0 +1,55 @@
# 🔗 GOGS Repository Link
- **Repo Name**: `git-sigil`
- **GOGS User**: `mrhavens`
- **Remote URL**: [https://netmon.thefoldwithin.earth/mrhavens/git-sigil](https://netmon.thefoldwithin.earth/mrhavens/git-sigil)
- **Local Repo Path**: `/home/mrhavens/fieldwork/git-sigil`
- **Remote Label**: `gogs`
- **Default Branch**: `master`
- **Repo Created**: `2025-06-13 01:37:22`
---
## 📦 Commit Info
- **This Commit Timestamp**: `2025-06-13 01:37:22`
- **Last Commit SHA**: `c067a9a35bb2aa01534641530e04d121b460bb45`
- **Last Commit Message**: `GOGS metadata link commit at 2025-06-13 01:28:57 — https://netmon.thefoldwithin.earth/mrhavens/git-sigil/commit/bce675bc7e628fa22832272a21d2ed02b5172fbd`
- **Last Commit Author**: `Mark Randall Havens <mark.r.havens@gmail.com>`
- **Last Commit Date**: `Fri Jun 13 01:28:57 2025 -0500`
- **This Commit URL**: [https://netmon.thefoldwithin.earth/mrhavens/git-sigil/commit/c067a9a35bb2aa01534641530e04d121b460bb45](https://netmon.thefoldwithin.earth/mrhavens/git-sigil/commit/c067a9a35bb2aa01534641530e04d121b460bb45)
---
## 📊 Repo Status
- **Total Commits**: `1312`
- **Tracked Files**: `163`
- **Uncommitted Changes**: `Yes`
- **Latest Tag**: `None`
---
## 🧭 Environment
- **Host Machine**: `samson`
- **Current User**: `mrhavens`
- **Time Zone**: `CDT`
- **Script Version**: `2.3`
---
## 🧬 Hardware & OS Fingerprint
- **OS Name**: `Linux`
- **OS Version**: `Ubuntu 22.04.5 LTS`
- **Kernel Version**: `6.6.87.1-microsoft-standard-WSL2`
- **Architecture**: `x86_64`
- **System Uptime**: $(uptime -p 2>/dev/null || echo "Unknown")`
- **Local IP**: $(hostname -I 2>/dev/null | awk '{print }' 2>/dev/null || echo "Unknown")`
- **CPU Model**: $(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' 2>/dev/null || echo "Unknown")`
- **Total RAM (GB)**: $(awk '/MemTotal/ {printf "%.2f", /1024/1024}' /proc/meminfo 2>/dev/null || echo "Unknown")`
---
_Auto-generated by `gitfield-gogs` push script._

View file

@ -14,10 +14,10 @@
"rid": "rad:z3FEj7rF8gZw9eFksCuiN43qjzrex",
"peer_id": "z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz"
},
"commit": "cd1b681",
"tree_hash": "b58bc1b191b7891bae0ab479d938eedaf5e0f3fb",
"timestamp": "2025-06-13T03:33:02Z",
"synced_cycles": 3,
"commit": "03c37e1",
"tree_hash": "4cf23cd25c21f6b41c80e5377ebabc11d193f6fd",
"timestamp": "2025-06-14T01:21:44Z",
"synced_cycles": 0,
"gpg_signatures": [
]

View file

@ -6,26 +6,26 @@
- **Local Repo Path**: `/home/mrhavens/fieldwork/git-sigil`
- **Remote Label**: `local`
- **Default Branch**: `master`
- **Repo Created**: `2025-06-12 22:39:18`
- **Repo Created**: `2025-06-13 20:21:44`
---
## 📦 Commit Info
- **This Commit Timestamp**: `2025-06-12 22:39:18`
- **Last Commit SHA**: `1b3cbddd28f16b6e3971bc60603c0ebcf3506b19`
- **Last Commit Message**: `Generated index.json at 2025-06-13T03:33:02Z`
- **This Commit Timestamp**: `2025-06-13 20:21:44`
- **Last Commit SHA**: `a6287409fdb3eb82cbd23f779f76d6348f313795`
- **Last Commit Message**: `Generated docs/integrity.sha256 at 2025-06-14T01:21:44Z`
- **Last Commit Author**: `Mark Randall Havens <mark.r.havens@gmail.com>`
- **Last Commit Date**: `Thu Jun 12 22:39:17 2025 -0500`
- **Last Commit Date**: `Fri Jun 13 20:21:44 2025 -0500`
- **This Commit URL**: `file:///home/mrhavens/git-local-repos/git-sigil.git`
---
## 📊 Repo Status
- **Total Commits**: `1268`
- **Tracked Files**: `160`
- **Uncommitted Changes**: `No`
- **Total Commits**: `1322`
- **Tracked Files**: `163`
- **Uncommitted Changes**: `Yes`
- **Latest Tag**: `None`
---
@ -48,7 +48,7 @@
- **Running in Docker**: `No`
- **Running in WSL**: `Yes`
- **Virtual Machine**: `wsl`
- **System Uptime**: `up 2 days, 5 hours, 12 minutes`
- **System Uptime**: `up 3 days, 2 hours, 54 minutes`
- **MAC Address**: `00:15:5d:11:35:bd`
- **Local IP**: `172.28.107.95`
- **CPU Model**: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`

View file

@ -338,6 +338,18 @@
"branch": "master",
"commit": "1b3cbddd28f16b6e3971bc60603c0ebcf3506b19",
"message": "Generated index.json at 2025-06-13T03:33:02Z"
},
{
"timestamp": "2025-06-13 00:33:24",
"branch": "master",
"commit": "025c2edbd4516465df2e3e56de876251028d0fdb",
"message": "Generated docs/integrity.sha256 at 2025-06-13T05:33:24Z"
},
{
"timestamp": "2025-06-13 20:21:44",
"branch": "master",
"commit": "a6287409fdb3eb82cbd23f779f76d6348f313795",
"message": "Generated docs/integrity.sha256 at 2025-06-14T01:21:44Z"
}
]
}

View file

@ -907,3 +907,27 @@
Diff Summary:
.gitfield/github.sigil.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
[2025-06-13T05:33:24Z] Local: , Branch=master, Commit=bb86593
Diff Summary:
.gitfield/local.sigil.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
[2025-06-13T05:33:27Z] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz, Branch=master, Commit=bb86593
CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details
CLI: git ls-tree -r --name-only HEAD # View file structure
Diff Summary:
.gitfield/push_log.json | 6 ++
.gitfield/pushed.log | 4 +
bin/gitfield-netmon | 282 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 292 insertions(+)
[2025-06-14T01:21:44Z] Local: , Branch=master, Commit=03c37e1
Diff Summary:
.gitfield/local.sigil.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
[2025-06-14T01:21:46Z] Radicle: RID=rad:z3FEj7rF8gZw9eFksCuiN43qjzrex, Peer ID=z6Mkw5s3ppo26C7y7tGK5MD8n2GqTHS582PPpeX5Xqbu2Mpz, Branch=master, Commit=03c37e1
CLI: rad inspect rad:z3FEj7rF8gZw9eFksCuiN43qjzrex # View project details
CLI: git ls-tree -r --name-only HEAD # View file structure
Diff Summary:
.gitfield/push_log.json | 6 +
.gitfield/pushed.log | 4 +
bin/gitfield-netmon | 301 +++++++++++++++++++-----------------------------
3 files changed, 127 insertions(+), 184 deletions(-)

View file

@ -6,25 +6,25 @@
- **Local Repo Path**: `/home/mrhavens/fieldwork/git-sigil`
- **Remote Label**: `remember`
- **Default Branch**: `master`
- **Repo Created**: `2025-06-12 22:39:29`
- **Repo Created**: `2025-06-13 20:21:48`
---
## 📦 Commit Info
- **This Commit Timestamp**: `2025-06-12 22:39:29`
- **Last Commit SHA**: `f914ea0e89ff7009c85a494d67cf64887c6a3186`
- **Last Commit Message**: `Post-Radicle sync at 2025-06-13T03:33:02Z`
- **This Commit Timestamp**: `2025-06-13 20:21:48`
- **Last Commit SHA**: `337eaed966c8009457b47aa5369d61a9a561227d`
- **Last Commit Message**: `Post-Radicle sync at 2025-06-14T01:21:44Z`
- **Last Commit Author**: `Mark Randall Havens <mark.r.havens@gmail.com>`
- **Last Commit Date**: `Thu Jun 12 22:39:28 2025 -0500`
- **This Commit URL**: [https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/f914ea0e89ff7009c85a494d67cf64887c6a3186](https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/f914ea0e89ff7009c85a494d67cf64887c6a3186)
- **Last Commit Date**: `Fri Jun 13 20:21:46 2025 -0500`
- **This Commit URL**: [https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/337eaed966c8009457b47aa5369d61a9a561227d](https://remember.thefoldwithin.earth/mrhavens/git-sigil/commit/337eaed966c8009457b47aa5369d61a9a561227d)
---
## 📊 Repo Status
- **Total Commits**: `1271`
- **Tracked Files**: `160`
- **Total Commits**: `1325`
- **Tracked Files**: `163`
- **Uncommitted Changes**: `No`
- **Latest Tag**: `None`
@ -48,7 +48,7 @@
- **Running in Docker**: `No`
- **Running in WSL**: `Yes`
- **Virtual Machine**: `wsl`
- **System Uptime**: `up 2 days, 5 hours, 12 minutes`
- **System Uptime**: `up 3 days, 2 hours, 54 minutes`
- **MAC Address**: `00:15:5d:11:35:bd`
- **Local IP**: `172.28.107.95`
- **CPU Model**: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`

View file

@ -13,7 +13,7 @@
"https://gitea.com/mrhavens/git-sigil",
"rad:z3FEj7rF8gZw9eFksCuiN43qjzrex"
],
"dateModified": "2025-06-13T03:33:02Z",
"dateModified": "2025-06-14T01:21:44Z",
"publisher": {
"@type": "Person",
"name": "Mark Randall Havens"

295
bin/gitfield-netmon Executable file
View file

@ -0,0 +1,295 @@
#!/bin/bash
set -eo pipefail
IFS=$'\n\t'
# Configuration
GIT_REMOTE_NAME="gogs"
GOGS_DOMAIN="netmon.thefoldwithin.earth"
GOGS_API="https://$GOGS_DOMAIN/api/v1"
USERNAME="mrhavens"
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "[ERROR] Not inside a git repository." >&2; exit 1; }
REPO_NAME=$(basename "$REPO_ROOT") || { echo "[ERROR] Failed to get repository name" >&2; exit 1; }
MARKDOWN_FILE="$REPO_ROOT/.gitfield/gogs.sigil.md"
DEFAULT_NAME="Mark Randall Havens"
DEFAULT_EMAIL="mark.r.havens@gmail.com"
TOKEN_FILE="$HOME/.gitfield_token_gogs"
SCRIPT_VERSION="2.3"
# Logging functions
info() { echo -e "\e[1;34m[INFO]\e[0m ${*:-}"; }
warn() { echo -e "\e[1;33m[WARN]\e[0m ${*:-}"; }
error() { echo -e "\e[1;31m[ERROR]\e[0m ${*:-}" >&2; exit 1; }
# Check for required tools
info "Checking for required tools..."
for cmd in git curl jq; do
command -v "$cmd" >/dev/null || {
sudo apt update -qq || warn "Failed to update package lists, continuing..."
sudo apt install -y git curl jq || error "Failed to install $cmd"
}
done
# Function to prompt for GOGS token or password
prompt_for_credentials() {
info "Credentials required."
echo "🔐 Generate a token at https://$GOGS_DOMAIN/user/settings/applications (Recommended)"
echo " - REQUIRED: Select the 'write:repository' scope"
echo "🔐 Alternatively, use your GOGS password"
echo "🔐 Paste your GOGS Personal Access Token or Password (will not be echoed):"
read -rsp "Token/Password: " CRED
echo
[[ -z "$CRED" ]] && error "Credentials cannot be empty"
echo "$CRED" > "$TOKEN_FILE" || error "Failed to write credentials to $TOKEN_FILE"
chmod 600 "$TOKEN_FILE" || error "Failed to set permissions on $TOKEN_FILE"
info "Credentials saved at $TOKEN_FILE"
}
# Handle credentials
RESET_AUTH=false
if [[ "${1:-}" == "--reset-auth" ]]; then
RESET_AUTH=true
rm -f "$TOKEN_FILE" "$HOME/.git-credentials" 2>/dev/null || warn "Failed to remove credential files"
info "Authentication reset requested."
fi
if [[ -f "$TOKEN_FILE" && "$RESET_AUTH" == false ]]; then
CRED=$(cat "$TOKEN_FILE" 2>/dev/null) || error "Failed to read credentials from $TOKEN_FILE"
info "Using cached credentials from $TOKEN_FILE"
else
prompt_for_credentials
fi
# Verify GOGS token
info "Verifying GOGS credentials (read access)..."
TOKEN_TEST=$(curl -k -s -H "Authorization: token $CRED" "$GOGS_API/user" | jq -r .login 2>/dev/null || echo "")
if [[ "$TOKEN_TEST" != "$USERNAME" ]]; then
warn "Token verification failed. Credentials may be a password or invalid token."
# Retry with credentials as password if token fails
PASSWORD_TEST=$(curl -k -s -u "$USERNAME:$CRED" "$GOGS_API/user" | jq -r .login 2>/dev/null || echo "")
if [[ "$PASSWORD_TEST" != "$USERNAME" ]]; then
warn "Password verification also failed. Please provide valid credentials."
rm -f "$TOKEN_FILE"
prompt_for_credentials
TOKEN_TEST=$(curl -k -s -H "Authorization: token $CRED" "$GOGS_API/user" | jq -r .login 2>/dev/null || echo "")
PASSWORD_TEST=$(curl -k -s -u "$USERNAME:$CRED" "$GOGS_API/user" | jq -r .login 2>/dev/null || echo "")
[[ "$TOKEN_TEST" != "$USERNAME" && "$PASSWORD_TEST" != "$USERNAME" ]] && error "New credentials verification failed. Ensure they are valid."
fi
info "Credentials verified as password: $PASSWORD_TEST"
else
info "Credentials verified as token: $TOKEN_TEST"
fi
# Test write access via API
info "Testing write access via API..."
TEST_REPO="test-repo-$(date +%s)"
WRITE_TEST=$(curl -k -v -H "Authorization: token $CRED" -X POST "$GOGS_API/user/repos" -H "Content-Type: application/json" -d "{\"name\": \"$TEST_REPO\", \"description\": \"Test\", \"private\": false, \"auto_init\": false}" 2>&1)
if [[ $? -ne 0 || $(echo "$WRITE_TEST" | grep -i "401" 2>/dev/null) ]]; then
warn "Write access test failed with token: $WRITE_TEST"
WRITE_TEST=$(curl -k -v -u "$USERNAME:$CRED" -X POST "$GOGS_API/user/repos" -H "Content-Type: application/json" -d "{\"name\": \"$TEST_REPO\", \"description\": \"Test\", \"private\": false, \"auto_init\": false}" 2>&1)
if [[ $? -ne 0 || $(echo "$WRITE_TEST" | grep -i "401" 2>/dev/null) ]]; then
error "Write access failed with both token and password. Check GOGS configuration."
fi
info "Write access test passed with password: $WRITE_TEST"
else
info "Write access test passed with token: $WRITE_TEST"
fi
# Test Git push with credentials
info "Testing Git push with credentials..."
GIT_TEST=$(git ls-remote --heads "https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git" 2>&1)
if [[ $? -ne 0 || $(echo "$GIT_TEST" | grep -i "401" 2>/dev/null) ]]; then
warn "Git push test failed with token: $GIT_TEST"
GIT_TEST=$(git ls-remote --heads "https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git" 2>&1)
if [[ $? -ne 0 || $(echo "$GIT_TEST" | grep -i "401" 2>/dev/null) ]]; then
warn "Git push test also failed with password. This suggests a GOGS Git-over-HTTP issue."
warn "1. Edit /home/git/gogs/custom/conf/app.ini and ensure:"
warn " [auth] ENABLE_ACCESS_TOKEN = true"
warn " [git] DISABLE_HTTP_GIT = false"
warn "2. Restart GOGS: sudo systemctl restart gogs"
warn "3. Try manual push with token: git push https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git $DEFAULT_BRANCH"
warn "4. Try manual push with password: git push https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git $DEFAULT_BRANCH"
warn "5. Check GOGS logs: sudo tail -f /home/git/gogs/log/gogs.log"
error "Git push test failed. Adjust GOGS configuration or use manual workaround."
fi
info "Git push test passed with password: $GIT_TEST"
else
info "Git push test passed with token: $GIT_TEST"
fi
# Set git user info
git config --global user.name "$DEFAULT_NAME" || warn "Failed to set git user name"
git config --global user.email "$DEFAULT_EMAIL" || warn "Failed to set git user email"
info "Git identity set to: $DEFAULT_NAME <$DEFAULT_EMAIL>"
# Ensure at least one commit exists
if ! git rev-parse HEAD &>/dev/null; then
error "No commits found. Please add and commit files first."
fi
# Configure git credentials for HTTPS
info "Configuring git credentials for HTTPS..."
if [[ "$TOKEN_TEST" == "$USERNAME" ]]; then
echo "https://$USERNAME:$CRED@$GOGS_DOMAIN" > "$HOME/.git-credentials" || error "Failed to write git credentials"
else
echo "https://$USERNAME:$CRED@$GOGS_DOMAIN" > "$HOME/.git-credentials" || error "Failed to write git credentials"
fi
chmod 600 "$HOME/.git-credentials" || error "Failed to set permissions on git credentials"
# Check and create GOGS repository
info "Checking if repository exists..."
EXISTS=$(curl -k -s -H "Authorization: token $CRED" "$GOGS_API/repos/$USERNAME/$REPO_NAME" | jq -r .name 2>/dev/null || echo "")
if [[ "$EXISTS" != "$REPO_NAME" ]]; then
info "Creating repository $REPO_NAME on GOGS..."
CURL_OUTPUT=$(curl -k -s --fail -X POST "$GOGS_API/user/repos" \
-H "Authorization: token $CRED" \
-H "Content-Type: application/json" \
-d "{\"name\": \"$REPO_NAME\", \"description\": \"Created via gitfield-gogs\", \"private\": false, \"auto_init\": false}" 2>&1) || {
warn "Failed to create repository with token: $CURL_OUTPUT"
CURL_OUTPUT=$(curl -k -s --fail -u "$USERNAME:$CRED" -X POST "$GOGS_API/user/repos" \
-H "Content-Type: application/json" \
-d "{\"name\": \"$REPO_NAME\", \"description\": \"Created via gitfield-gogs\", \"private\": false, \"auto_init\": false}" 2>&1)
if [[ $? -ne 0 ]]; then
error "Repository creation failed with both token and password. Check GOGS configuration."
fi
info "Repository created successfully with password."
}
info "Repository created successfully with token."
fi
# Set up git remote
REMOTE_URL="https://$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git"
if ! git remote get-url "$GIT_REMOTE_NAME" &>/dev/null; then
info "Adding remote $GIT_REMOTE_NAME..."
git remote add "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to add remote $GIT_REMOTE_NAME"
else
info "Updating remote $GIT_REMOTE_NAME..."
git remote set-url "$GIT_REMOTE_NAME" "$REMOTE_URL" || error "Failed to set remote URL for $GIT_REMOTE_NAME"
fi
# Generate metadata file
mkdir -p "$(dirname "$MARKDOWN_FILE")" || error "Failed to create directory for $MARKDOWN_FILE"
TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') || error "Failed to get timestamp"
DEFAULT_BRANCH=$(git symbolic-ref --short HEAD) || error "Failed to get default branch"
REPO_PATH="$REPO_ROOT"
LATEST_SHA=$(git rev-parse HEAD) || error "Failed to get latest commit SHA"
LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%s" 2>/dev/null || echo "Unknown")
LAST_COMMIT_DATE=$(git log -1 --pretty=format:"%ad" 2>/dev/null || echo "Unknown")
LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>" 2>/dev/null || echo "Unknown")
TOTAL_COMMITS=$(git rev-list --count HEAD 2>/dev/null || echo "Unknown")
TRACKED_FILES=$(git ls-files 2>/dev/null | wc -l 2>/dev/null || echo "Unknown")
UNCOMMITTED=$(if ! git diff --quiet 2>/dev/null || ! git diff --cached --quiet 2>/dev/null; then echo "Yes"; else echo "No"; fi)
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "None")
HOSTNAME=$(hostname 2>/dev/null || echo "Unknown")
CURRENT_USER=$(whoami 2>/dev/null || echo "Unknown")
TIMEZONE=$(date +%Z 2>/dev/null || echo "Unknown")
OS_NAME=$(uname -s 2>/dev/null || echo "Unknown")
KERNEL_VERSION=$(uname -r 2>/dev/null || echo "Unknown")
ARCHITECTURE=$(uname -m 2>/dev/null || echo "Unknown")
OS_PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release 2>/dev/null | cut -d= -f2 | tr -d '"' || echo "Unknown")
WEB_LINK="https://$GOGS_DOMAIN/$USERNAME/$REPO_NAME"
cat > "$MARKDOWN_FILE" <<EOF
# 🔗 GOGS Repository Link
- **Repo Name**: \`$REPO_NAME\`
- **GOGS User**: \`$USERNAME\`
- **Remote URL**: [$WEB_LINK]($WEB_LINK)
- **Local Repo Path**: \`$REPO_PATH\`
- **Remote Label**: \`$GIT_REMOTE_NAME\`
- **Default Branch**: \`$DEFAULT_BRANCH\`
- **Repo Created**: \`$TIMESTAMP\`
---
## 📦 Commit Info
- **This Commit Timestamp**: \`$TIMESTAMP\`
- **Last Commit SHA**: \`$LATEST_SHA\`
- **Last Commit Message**: \`$LAST_COMMIT_MSG\`
- **Last Commit Author**: \`$LAST_COMMIT_AUTHOR\`
- **Last Commit Date**: \`$LAST_COMMIT_DATE\`
- **This Commit URL**: [$WEB_LINK/commit/$LATEST_SHA]($WEB_LINK/commit/$LATEST_SHA)
---
## 📊 Repo Status
- **Total Commits**: \`$TOTAL_COMMITS\`
- **Tracked Files**: \`$TRACKED_FILES\`
- **Uncommitted Changes**: \`$UNCOMMITTED\`
- **Latest Tag**: \`$LATEST_TAG\`
---
## 🧭 Environment
- **Host Machine**: \`$HOSTNAME\`
- **Current User**: \`$CURRENT_USER\`
- **Time Zone**: \`$TIMEZONE\`
- **Script Version**: \`$SCRIPT_VERSION\`
---
## 🧬 Hardware & OS Fingerprint
- **OS Name**: \`$OS_NAME\`
- **OS Version**: \`$OS_PRETTY_NAME\`
- **Kernel Version**: \`$KERNEL_VERSION\`
- **Architecture**: \`$ARCHITECTURE\`
- **System Uptime**: \$(uptime -p 2>/dev/null || echo "Unknown")\`
- **Local IP**: \$(hostname -I 2>/dev/null | awk '{print $1}' 2>/dev/null || echo "Unknown")\`
- **CPU Model**: \$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' 2>/dev/null || echo "Unknown")\`
- **Total RAM (GB)**: \$(awk '/MemTotal/ {printf "%.2f", $2/1024/1024}' /proc/meminfo 2>/dev/null || echo "Unknown")\`
---
_Auto-generated by \`gitfield-gogs\` push script._
EOF
[[ $? -eq 0 ]] || error "Failed to write metadata to $MARKDOWN_FILE"
# Commit and push
set +e
info "Committing markdown file..."
git add "$MARKDOWN_FILE" || warn "Failed to add markdown file"
git commit -m "GOGS metadata link commit at $TIMESTAMP — $WEB_LINK/commit/$LATEST_SHA" || warn "No changes to commit"
info "Pushing to GOGS..."
if ! git config --get branch."$DEFAULT_BRANCH".remote &>/dev/null; then
if ! git push -u "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" 2>&1 | tee /tmp/git-push.log; then
warn "Push to GOGS failed. Check /tmp/git-push.log for details."
if grep -q "401" /tmp/git-push.log; then
warn "HTTP 401 error detected. Token or password failed for Git push."
warn "This suggests a GOGS Git-over-HTTP configuration issue."
warn "1. Edit /home/git/gogs/custom/conf/app.ini and ensure:"
warn " [auth] ENABLE_ACCESS_TOKEN = true"
warn " [git] DISABLE_HTTP_GIT = false"
warn "2. Restart GOGS: sudo systemctl restart gogs"
warn "3. Try manual push with current credentials: git push https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git $DEFAULT_BRANCH"
warn "4. Check GOGS logs: sudo tail -f /home/git/gogs/log/gogs.log"
error "Push failed. Adjust GOGS configuration or verify credentials."
else
error "Failed to push to $REMOTE_URL. Check network or GOGS server."
fi
fi
else
if ! git push "$GIT_REMOTE_NAME" "$DEFAULT_BRANCH" 2>&1 | tee /tmp/git-push.log; then
warn "Push to GOGS failed. Check /tmp/git-push.log for details."
if grep -q "401" /tmp/git-push.log; then
warn "HTTP 401 error detected. Token or password failed for Git push."
warn "This suggests a GOGS Git-over-HTTP configuration issue."
warn "1. Edit /home/git/gogs/custom/conf/app.ini and ensure:"
warn " [auth] ENABLE_ACCESS_TOKEN = true"
warn " [git] DISABLE_HTTP_GIT = false"
warn "2. Restart GOGS: sudo systemctl restart gogs"
warn "3. Try manual push with current credentials: git push https://$USERNAME:$CRED@$GOGS_DOMAIN/$USERNAME/$REPO_NAME.git $DEFAULT_BRANCH"
warn "4. Check GOGS logs: sudo tail -f /home/git/gogs/log/gogs.log"
error "Push failed. Adjust GOGS configuration or verify credentials."
else
error "Failed to push to $REMOTE_URL. Check network or GOGS server."
fi
fi
fi
set -e
info "✅ GOGS push complete."
echo -e "\n🔗 View in browser: $WEB_LINK\n"

View file

@ -24,4 +24,4 @@ The directory hosts a public-facing, SEO-optimized canonical declaration for th
This directory ensures the `git-sigil` project is discoverable via search engines and accessible to humans and bots. It declares the canonical repository at [https://remember.thefoldwithin.earth/mrhavens/git-sigil](https://remember.thefoldwithin.earth/mrhavens/git-sigil) and links to all mirrors, reinforcing the GitField recursive metadata strategy for sovereign publishing.
Generated by `gitfield-sync` at 2025-06-13T03:33:02Z (v1.4).
Generated by `gitfield-sync` at 2025-06-14T01:21:44Z (v1.4).

View file

@ -27,7 +27,7 @@
"https://gitea.com/mrhavens/git-sigil",
"rad:z3FEj7rF8gZw9eFksCuiN43qjzrex"
],
"dateModified": "2025-06-13T03:33:02Z",
"dateModified": "2025-06-14T01:21:44Z",
"author": {
"@type": "Person",
"name": "Mark Randall Havens"
@ -43,7 +43,7 @@
</script>
</head>
<body>
<!-- Generated by gitfield-sync v1.4 | 2025-06-13T03:33:02Z -->
<!-- Generated by gitfield-sync v1.4 | 2025-06-14T01:21:44Z -->
<header>
<h1>GitField Sovereign Canonical Repository: <code>git-sigil</code></h1>
</header>

View file

@ -1,5 +1,5 @@
# SHA-256 Integrity Hashes for /docs Metadata Files
# Generated by gitfield-sync at 2025-06-13T03:33:02Z (v1.4)
# Generated by gitfield-sync at 2025-06-14T01:21:44Z (v1.4)
6093f6beb366d18662b3cea94d3c24b232ab174ccc860b00e97aef51a6f5e4ed /home/mrhavens/fieldwork/git-sigil/docs/canonical.meta
5ae6c8cbcd409b4b672aa34bff98e061810a9e85818abd1bc0a028fe7edfcd65 /home/mrhavens/fieldwork/git-sigil/docs/canonical.md

View file

@ -2,97 +2,97 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://remember.thefoldwithin.earth/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/index.html</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/canonical.meta</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/canonical.md</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/index.json</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/gitfield.json</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/.well-known/gitfield.json</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/repos.json</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/pushed.log</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil/docs/gitfield.README.txt</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://github.com/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://gitlab.com/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://bitbucket.org/thefoldwithin/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://remember.thefoldwithin.earth/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://codeberg.org/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://gitea.com/mrhavens/git-sigil</loc>
<lastmod>2025-06-13T03:33:02Z</lastmod>
<lastmod>2025-06-14T01:21:44Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>

0
test Normal file
View file