mirror of
https://github.com/aljazceru/gitpear.git
synced 2025-12-17 14:14:22 +01:00
auth
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
exec > >(tee -a "/tmp/deployment.log") 2>&1
|
||||
|
||||
export GIT_PEAR=/srv/repos/pear
|
||||
export GIT_PEAR_AUTH="nip98"
|
||||
export GIT_PEAR_AUTH_NSEC="nsec1lnumf25dacf7804ezv4zyd262j08g3n9h6h2fdntwgpxmhwqhw3sy3vjkp"
|
||||
git pear daemon -s
|
||||
# if $1 exists
|
||||
if [ -n "$1" ]; then
|
||||
@@ -16,7 +18,9 @@ if [[ $REPO_NAME =~ ^https.* ]]; then
|
||||
mkdir -p /srv/repos/"$ORIGINAL_NAME"
|
||||
git clone $REPO_NAME /srv/repos/"$ORIGINAL_NAME"
|
||||
cd /srv/repos/"$ORIGINAL_NAME"
|
||||
git pear init -s
|
||||
git pear init .
|
||||
git pear share . public
|
||||
git pear acl add $USER_NPUB:admin
|
||||
# enter pear repo and expose http
|
||||
cd /srv/repos/pear/"$ORIGINAL_NAME"/
|
||||
echo "[http]" >> config
|
||||
@@ -27,8 +31,9 @@ fi
|
||||
if [[ ! $REPO_NAME =~ ^https.* ]]; then
|
||||
mkdir -p /srv/repos/"$REPO_NAME"
|
||||
cd /srv/repos/"$REPO_NAME"
|
||||
git init
|
||||
git pear init -s
|
||||
git pear init .
|
||||
git pear share . public
|
||||
git pear acl add $USER_NPUB:admin
|
||||
# enter pear repo and expose http
|
||||
cd /srv/repos/pear/"$REPO_NAME"/
|
||||
echo "[http]" >> config
|
||||
|
||||
Reference in New Issue
Block a user