GOGS SSL certificate expired again #4

Closed
opened 2023-06-05 23:12:07 +02:00 by j · 2 comments
Owner

Reproduce:

$ curl -skv https://gogs.gtsplab.com:5432/ 2>&1 | grep expire
*  expire date: Jun  5 01:11:10 2023 GMT

Fix:

  1. Go here: https://isp-neth6p.hcompanyservers.net/ispmgr#/form/sslcert.edit/7?elid=fhvqdzox%25%23%25gtsplab.com_le1&elname=gtsplab.com_le1

  2. Backup keys:

mv cert.pem bak/cert-`date +%s`.pem                                                           
mv key.pem bak/key-`date +%s`.pem                                                             
  1. Put files here: /var/www/fhvqdzox/data/www/gogs.gtsplab.com/gogs/custom/https/

  2. Reformat pasted data: vim and s/ /\r/g

  3. Delete lockfile: rm /var/www/fhvqdzox/data/locks/gogs.lock

  4. Restart GOGS: /usr/bin/flock -n /var/www/fhvqdzox/data/locks/gogs.lock /var/www/fhvqdzox/data/scripts/gogs.sh &

Reproduce: ``` $ curl -skv https://gogs.gtsplab.com:5432/ 2>&1 | grep expire * expire date: Jun 5 01:11:10 2023 GMT ``` Fix: 1. Go here: https://isp-neth6p.hcompanyservers.net/ispmgr#/form/sslcert.edit/7?elid=fhvqdzox%25%23%25gtsplab.com_le1&elname=gtsplab.com_le1 2. Backup keys: ``` mv cert.pem bak/cert-`date +%s`.pem mv key.pem bak/key-`date +%s`.pem ``` 3. Put files here: `/var/www/fhvqdzox/data/www/gogs.gtsplab.com/gogs/custom/https/` 4. Reformat pasted data: `vim` and `s/ /\r/g` 5. Delete lockfile: `rm /var/www/fhvqdzox/data/locks/gogs.lock` 6. Restart GOGS: `/usr/bin/flock -n /var/www/fhvqdzox/data/locks/gogs.lock /var/www/fhvqdzox/data/scripts/gogs.sh &`
Author
Owner

Fixed with script https://gogs.gtsplab.com:5432/admins/infra/src/main/update-gogs-certs.php, which now runs on the first of the month.

5 0 1 * * /var/www/fhvqdzox/data/infra/update-gogs-certs.php

Fixed with script `https://gogs.gtsplab.com:5432/admins/infra/src/main/update-gogs-certs.php`, which now runs on the first of the month. `5 0 1 * * /var/www/fhvqdzox/data/infra/update-gogs-certs.php`
j closed this issue 2023-06-06 12:53:32 +02:00
Author
Owner
Note that the API for ispmgr is documented here: https://docs.ispmanager.com/ispmanager6-business/guide-to-ispsystem-software-api
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: j/Issues#4