Skip to content

Commit fdd9e42

Browse files
author
Matthias Koeppe
committed
.gitpod-setup-trac-remote.sh: Only set up the read-only remote
1 parent 30b3d78 commit fdd9e42

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

.gitpod-setup-trac-remote.sh

+2-23
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,5 @@
44
set -e
55

66
# Setup trac as remote
7-
## In order to push to trac, generate a new key with `ssh-keygen -f tempkey` and save the private key to gitpod `gp env PRIVATE_SSH_KEY="$(<tempkey)"` (or by following https://www.gitpod.io/docs/environment-variables#using-the-account-settings)
8-
## then follow https://doc.sagemath.org/html/en/developer/trac.html#linking-your-public-key-to-your-trac-account to register the public key with trac.
9-
## Afterwards, create a new gitpod workspace.
10-
git remote remove trac 2> /dev/null || true # might still exists from a previous run/prebuild
11-
if [[ -n "${PRIVATE_SSH_KEY}" ]]; then
12-
# Setup ssh key for authentication with trac
13-
mkdir -p ~/.ssh
14-
echo $PRIVATE_SSH_KEY | sed 's/\(-----\(BEGIN\|END\) OPENSSH PRIVATE KEY-----\)/\n\1\n/g' > ~/.ssh/id_rsa
15-
sed -i '/^$/d' ~/.ssh/id_rsa
16-
chmod 600 ~/.ssh/id_rsa
17-
echo "PubkeyAcceptedKeyTypes +ssh-rsa" > ~/.ssh/config
18-
ssh-keyscan -H trac.sagemath.org >> ~/.ssh/known_hosts
19-
20-
# Setup trac repo
21-
git remote add trac [email protected]:sage.git -t master -t develop -t $(git branch --show-current)
22-
git remote set-url --push trac [email protected]:sage.git
23-
git fetch trac
24-
git branch -u trac/$(git branch --show-current)
25-
else
26-
# Fallback to sagemath mirror
27-
git remote add trac https://github.com/sagemath/sagetrac-mirror.git -t master -t develop
28-
git remote set-url --push trac pushing-needs-ssh-key
29-
fi
7+
git remote add trac https://github.com/sagemath/sagetrac-mirror.git -t master -t develop
8+
git remote set-url --push trac no-pushing--this-is-a-read-only-archive

0 commit comments

Comments
 (0)