Plugins auf einer selbstgehosteten Website installieren

:warning: This guide assumes that you have a self-hosted standard installation. We only support the standard method of install here, so these instructions assume you have a standard install.

:warning: This guide only applies to self-hosted Discourse instances. If you are using a managed hosting service, the available plugins are controlled by your hosting provider. For example, on our hosting these specific plugins are available by hosting tier.

In this tutorial, we’ll install the Discourse Solved plugin.

This tutorial requires an understanding of how to use GitHub repos, specifically, how to get or copy the git clone URL and how to edit YAML (*.yml) files via the terminal using nano, specifically how to save and exit on nano. YAML files strongly follow indentations, so be sure to respect these as you copy and paste and edit the necessary *.yml for your Discourse instance.

  • Copy the plugin’s GitHub git clone url.

  • Access your container’s app.yml file (present in /var/discourse/containers/)

    cd /var/discourse
    nano containers/app.yml
    
  • Add the plugin’s repository URL to your container’s app.yml file:

    hooks:
      after_code:
        - exec:
            cd: $home/plugins
            cmd:
              - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
              - sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git
    

    Add the plugin’s git clone url just below the line containing git clone https://github.com/discourse/docker_manager.git)

    Follow the existing format of the docker_manager.git line; if it does not contain sudo -E -u discourse then insert - git clone https://github.com/discourse/discourse-solved.git.

  • Rebuild the container:

    cd /var/discourse
    ./launcher rebuild app
    

    That’s it, you’ve successfully installed the Discourse Solved plugin on your Discourse instance!


If your plugin is hosted in a private repository

You must use an OAuth token:

With the OAuth token, you can install your plugin in the same way as a public repo, and you don’t need to create a SSH key.

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
              - sudo -E -u discourse git clone https://<token>@github.com/owner/repo.git

We strongly advise you to use OAuth tokens for plugins in private repositories. However, if you cannot, see below.

SSH Key Private Install Steps
run:
  - exec: echo "Beginning of custom commands"
  
  - exec: cd /var/www/discourse && sudo -u discourse bundle install --deployment --without test --without development
  - exec: echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /user/.ssh/config
  - file:
      path: /user/.ssh/id_rsa
      chmod: 600
      contents: |
        -----BEGIN RSA PRIVATE KEY-----
        MIIEogIBAAKCAQEArCQG213utzqE5YVjTVF5exGRCkE9OuM7LCp/FOuPdoHrFUXk
           .... etc ....
        -----END RSA PRIVATE KEY-----
  - file:
      path: /user/.ssh/id_rsa.pub
      chmod: 600
      contents: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tj .... etc .... user@discourse
  - exec: cd $home/plugins && git clone git@github.com:SecretOrg/secret-plugin.git
  - exec: cd $home && sudo -E -u discourse bundle exec rake db:migrate
  - exec: cd $home && rm -fr tmp/cache
  - exec: cd $home &&  sudo -E -u discourse bundle exec rake assets:precompile
  - exec: rm /user/.ssh/id_rsa
  - exec: rm /user/.ssh/id_rsa.pub

  - exec: echo "End of custom commands"
  • Rebuild the container:
cd /var/discourse
./launcher rebuild app

Your private plugin should be installed on your Discourse instance.

How to uninstall a plugin

To remove a plugin, simply remove the - git clone https://github.com/... line from your app.yml file and rebuild your site via

cd /var/discourse
./launcher rebuild app
173 „Gefällt mir“
Discourse Slackdoor Plugin
How to create a new plugins?
Site maintenance mode during rebuilds?
Discourse Version 1.2
Embed Etherpad Lite pads into Discourse
Solved Button Plugin
LDAP Setup for Discourse
About the Plugin category
Discourse Checklist
Wild Apricot login plugin
Formatting toolbar
Quick Messages Plugin
Discourse Mark Plugin
Can Plugins Be Added To Basic Docker Install
Installing Plugins with Git
Does this software allow admin to put Adsense ads in?
Tickets Plugin :tickets:
"Onebox Assistant", crawl for those previews reliably!
Daemonite Material Theme
News Plugin :newspaper:
Installing new plugins
How do i install plugins after doing a fork?
Discourse Category Home :house:
Discourse BBCode
How to ad banners?
Topic Ratings Plugin
Install plugins in your non-Docker development environment
Generating lots of Invite Tokens
Category Page Plugin
Update private plugin without rebuilding the application
Bump Reset plugin - Annotated to help new devs
Admin Statistics Report
LDAP Auth Missing from Plugins
Projects management plugin
How do you add plugins?
Application Files after Digital Ocean Setup
Discord-rolesync plugin
Watching Categories based on on group in discourse
User feedback plugin
ReplyGif
Any options for over-riding the username restrictions?
Collude - a collaborative text editor for Discourse
Can I access Discourse forum Database to use for PowerBI reporting?
Discourse Code Review
Custom Trust Level
Discourse Doc Categories
Fatal: Not a git repository (or any parent up to mount point /discourse)
Fatal: Not a git repository (or any parent up to mount point /discourse)
How to add a Leaderboard link to the hamburger menu?
I need someone who can install a voting plugin
Custom Wizard Plugin :mage:
Introducing Font Awesome 5 and SVG icons
Click To Edit
Topic List Previews (legacy)
Legal Compliance Plugin
Discourse Spoiler-Alert
Triggering account creation/login on external service when a user logs in on discourse
Discourse Cookie Consent Banner
Community Network Visualisation
ListenBrainz
Subscription Plugin not working (Error)
Discourse-a2a-bbcode
Error using discourse-oauth2-basic plugin with NeonCRM
Question Answer Plugin
How might we better structure #howto?
How might we better structure #howto?
Cannot install new plugins: structure needs cleaning
Slow Discourse Rebuild on a VM with slow disks
Calendar Core - Needs any special theme?
Discourse Notifier
Discourse CommonMark text highlighting?
Mumble -- VOIP Plugin for Discourse
Advice on Installing Plugins
Smallcaps formatting
Cannot install plugin - nothing happens
What else do I need to take care of when self hosting?
Humanmark for Discourse - Hardware-Backed Humanity Verification
Topic Ratings Plugin
Verifiable Credentials Plugin
Discourse Shared Edits
Install Discourse for development using Docker
Installing discourse-math.git
Discourse Image Filter
Discourse Linkify Google Sheets
Developing Discourse Plugins - Part 1 - Create a basic plugin
Discourse Voting missing table on postgresql
Discourse Signatures
Discourse BBCode Color
Discourse Post Sorting Customizer
Unikname Connect plugin
Discourse Video Upload Plugin with YouTube and Vimeo
Quoting not working
User profile by ID instead of username
"Onebox Assistant", crawl for those previews reliably!
Error after update failed today: [rake themes:update assets:precompile]
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return
Votes don't Merge when we combine posts
Discourse User Feedback
LDAP Setup for Discourse
I need someone who can install a voting plugin
Availability of OpenID Connect in hosted plans
Codebytes Plugin
Multiple Users posting under same User or Group name?
What makes a successful volunteer Discourse sysadmin?
Not able to install any Discourse plugins
How to install the lazy-yt plugin
Issue With Sitemap
Discourse Private Replies
Google One Tap Login/Signup
Landing Pages Blog :small_airplane:
Group Invitation Plugin
Discourse Mailgun Routes
Word Cloud plugin
Geo Blocking plugin
Post folding
Signed Google Cloud CDN URLs
Google Groups Link Plugin
Discourse LinkedIn Authentication
Discourse VK Authentication (vkontakte)
Discourse OneDrive Picker
Discourse BCC
Discourse Prometheus
Discourse Dictionary Plugin :ab:
Category Restrictor plugin
Slack Bot Construction Kit :robot:
Discourse Authorship Plugin
Discourse Livestream
Locked out from WinSCP and can't Install Plugins!
Create custom Automations
Affiliate link functions - rewrite
🤖 Discourse llms.txt Generator Plugin
Editing a table whose some rows don't start with a pipe duplicate these rows
How to: discourse-sitemap is deprecated and merged into Discourse's core. Please remove it from your app.yml file.?
How to update plugins manually from the command line?
Introducing Discourse Chat (BETA)
Landing Pages Blog :small_airplane:
Discourse Restricted Replies
Discourse Yearly Review
Discourse Saved Searches
Discourse Intercom (Advanced)
Discourse Salesforce
Sign-In with Ethereum plugin
Discourse GitHub Verification
Discourse Algolia Search
Discourse Characters Required
Discourse No Bump
Discourse Teambuild
Installing Plugins in Discourse 101 for super-super dummies
Discourse Tooltips
Discourse Steam Login
Should I update my app.yml file?
Not enough space to rebuild
Landing Pages Plugin :small_airplane:
Configure OneLogin's SAML for Discourse
Migrate a phpBB3 forum to Discourse
Discourse Codeberg Login
Mentionables
Discourse hosting on Linode?
Can I use the Subscriptions plugin on my own server?
Embed comments from Discourse in your single page app
Discourse Confused About the Number of Posts in a Topic?
How to show Full Name in Embeds
Restrict users to post certain words per category
Microsoft Graph Mail Poller
Allow-pm-to-staff
Snapblocks
Discourse AI Topic Summary :robot:
Animated Avatar
Discourse Who's Online
Discourse Google Perspective API
Discourse Newsletter Integration
Discourse Docs
Gitcoin Passport Plugin
Discourse Math Editor
Rebuilding the container is constantly failing after following the standard instructions on plugin install
ActivityPub Plugin
Modal Window
Silenced Avatar Flair
Discourse Staff Alias
Discourse GCS Helper
Topic List Previews (TLP)
Discourse Another SMTP
Can more than one post be selected as the solution?
Unable to rebuild app - failed with exit code 1
I need help on installing a plugin
Discourse Follow
Custom Topic Button (group)
Discourse FontAwesome Pro
Discourse Zoom
Rocket.Chat SSO + embed plugin
Discourse blog (article and comments)
Stop Forum Spam Plugin
Email Extension
NFT avatar
Discourse Mingle
How can I install my own plugin written in Ruby?
Discourse MusicBrainz Onebox
Custom Topic Button
No editor preview while editing after upgrading to 3.x
Better-Anonymous
Error during upgrading from Beta 3.1.x to latest
Signatures plugin not in the /admin/plugins page
Category Moderators Enhancer
Are plugins free using the open-source, self-host option?
Monero Subscriptions Plugin
:cn: Discourse Math 插件
Discourse Audio Message
Discourse Jira
Randomized Banner
🏆 Discourse Rich JSON-LD Microdata Plugin
Private Topics Plugin
Install discourse doc plugin from Git is failed
Discourse Restrict PMs to certain Groups
Discourse Chatbot :robot:
Data Explorer Tutorial - Part 1 - Writing Your First Query
Option for scheduled replies
Discourse Disable Browser History Experiment
Publish Direct Messages
Discourse Authentication Validations
Discourse Provide Full Name in Mentions
Disable Email Verification for Discourse Plugin
Discourse send PDF inline
Discourse Anonymous Post
Discourse-embed-bilibili(在discourse中插入哔哩哔哩视频)
Set user registration IP address API endpoint
Trading Buttons
Locations Plugin :earth_africa:
User Response Times
Contact Form
Babble Chat
Discourse mail daily summary plugin
Discourse Preset Topic Composer
Discourse Custom Topic Lists
Highest-Post Excerpts in Topic List
What to Expect When Rebuilding Discourse
Seen lots of threads asking if Discourse is free when self hosted but nothing about the plugins
Rebuilding Forum (Restoring back-up works, rebuilding does not)
Discourse Surveys
Login Helper Plugin
Can't install reaction plugin
Error when installing Advertising
Globally replace translations
Discourse Retort
Discourse Translator
Discourse Category Experts
Discourse Chat Bridge (Telegram)
Trading Buttons
Discourse Disorder
Discourse AI plugin with self hosted discourse site
Hubot Adapter for Discourse
Discourse No Bump
CJK Formatter Plugin
Self-hosting Index
SCIM Plugin
Journal Plugin
Problem installing docs
How to install and configure AI features step by step
Discourse Encrypt (deprecated)
Discourse Open Graph
Turbowarp plugin
Discourse Workflow
Question about Docker Manager?
Moderation API Plugin
Discourse OpenID Connect (OIDC)
Dark Visitors
Discourse Dynamic Groups
Custom Summary Gist
Created as Default Sort Order
Topic List Previews (TLP)
Allow Title-Only Onebox
How to install the plugin on bitnami's repository
Discourse BBCode Tabs Plugin
Tag Intersection Navigator
I broke my site while updating it
I broke my site while updating it
Collections
Can Discourse ship frequent Docker images that do not need to be bootstrapped?
Push notifications for iPhone and Android apps
Highest-Post Excerpts in Topic List
Automation script: Move topic on close
Error installing theme from Github
Discourse Amazon SNS notifications
Best practices of keeping track of feature requests
Contact Form
No Bump First Post Plugin
How to Install Discourse Plugins Hosted in Private Repositories Using SSH Key?
How to Install Discourse Plugins Hosted in Private Repositories Using SSH Key?
How to Install Discourse Plugins Hosted in Private Repositories Using SSH Key?
National Flags (fork)
VK ID OAuth 2.1 Authentication for Discourse
🔐 Yandex ID OAuth2 Authentication for Discourse
Discourse Bilibili Onebox
Discourse Math
Time Registration plugin
Category Event Policy
Calendar RSVP Posts
Can more than one post be selected as the solution?
How to make a discourse forum look like forum.glamour.de
[Solved] Admin-upgrade page not showing up
Synchronizer-base for any backup provider
"Your Docker installation is not using a supported storage driver."
Formatting issues adding plugins to app.yml
Solution icon does not show in posts
Fixing problems with rebuild app
Auto Bookmarks plugin
Discourse VK Authentication (vkontakte)
Force specific users through moderation
Migrate a phpBB3 forum to Discourse
Homepage Filter plugin
Voice recording plugin
How to hook up JWT Single Sign On to Discourse
Should all plugins be cloned as the `discourse` user?
How I can add plugin to my discourse
OAuth2 integration with Drupal
Discord Sync: sync a Discourse forum with a Discord server
Discourse Narrative Bot Beta Feedback
No option appears to choose better answer
How to block all crawlers but Google's
Discourse Avatar name_first_letter
Auto-suspend inactive users
Algolia plugin indexation
Telegram Notifications Plugin (discourse-telegram-notifications)
Trying to install plugin (But not working)
How to break 99k char limit?
How to edit plugins code?
I want to install a plugin for development, what should I do?
News Plugin :newspaper:
Azure Blob Storage Plugin
./launcher rebuild app error './launcher: No such file or directory'
Discourse Wikilinks Plugin
SSO for College Account
Should all plugins be cloned as the `discourse` user?
Developing Discourse Plugins - Part 6 - Add acceptance tests
Favorites - select your favorite categories
Why do I need a block storage?
Plugin for Preventing Malicious Linking
Custom Wizard Plugin :mage:
Discourse Fingerprint - Browser Fingerprinting Plugin
Solved Reminders Plugin
Sidebar with categories
Merge Users Plugin
Events Plugin :calendar:
Unable to find /plugins dir
Pwned Passwords Validator
Launcher rebuild app does nothing
Business plugins and install on-premise
Private repo on Github
Discourse Dice Roller (RogerBW)

Ich habe den Leitfaden aktualisiert, um ein anderes Beispiel-Plugin anstelle von Discourse Spoiler Alert zu verwenden, das in den Kern integriert wurde.

Ich habe Discourse Solved verwendet, aber lassen Sie mich wissen, wenn ein anderes besser wäre.

9 „Gefällt mir“

Ich habe Discourse auf Digital Ocean gehostet und als ich dieses Format verwendet habe, wurde mir dieser Fehler angezeigt.

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git - sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git failed with return #<Process::Status: pid 252 exit 129>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home/plugins", "cmd"=>["sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git - sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git"]}
bootstrap failed with exit code 129
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
2a49220a4ff35feac3c1a9a4a9c1cad1094bde4c9ba321975ebc9ae7ead2bbee

Dann habe ich dieses Format verwendet

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git && sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git

anstelle von

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git
4 „Gefällt mir“

8 Beiträge wurden in ein neues Thema aufgeteilt: Formatierungsprobleme beim Hinzufügen von Plugins zu app.yml

Entschuldigen Sie die dumme Frage, aber woher weiß ich, ob ich sudo -E -u discourse für die git clone-Anweisung einschließen muss oder nicht?

3 „Gefällt mir“

Wie sieht Ihre docker_manager-Zeile aus?

4 „Gefällt mir“

Keine der anderen Einträge in meiner app.yml hatten den sudo-Teil, also habe ich ihn weggelassen und es hat bisher funktioniert

5 „Gefällt mir“
- exec: echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /user/.ssh/config

Es scheint, dass diese Methode nicht mehr funktioniert.

sh: 1: cannot create /user/.ssh/config: Directory nonexistent

Mit meinem selbst gehosteten GIT-Repository möchte ich wirklich SSH-Schlüssel verwenden.

3 „Gefällt mir“

Sie benötigen keinen SSH-Schlüssel im Container, löschen Sie einfach Folgendes:

1 „Gefällt mir“

Entschuldigung, ich glaube, ich verstehe nicht ganz…

Mein Repository ist per SSH erreichbar. Wie kann ich ein Plugin klonen, ohne einen SSH-Schlüssel zu verwenden?

1 „Gefällt mir“

Oh. Vielleicht liege ich falsch. Dann müssen Sie dieses Verzeichnis möglicherweise mit den richtigen Berechtigungen erstellen.

1 „Gefällt mir“

Verwirrend ist, dass ein Teil der Befehle in den Beispielen als root und ein Teil als Benutzer discourse ausgeführt werden soll. Das scheint nicht sehr konsistent zu sein.

  - exec: cd $home/plugins && git clone git@github.com:SecretOrg/secret-plugin.git

Im Gegensatz zu

  - exec: cd $home && sudo -E -u discourse bundle exec rake db:migrate

Ich werde im Shell des laufenden Containers nachforschen.

Die Installation dieses Plugins ist etwas kompliziert. Es wäre großartig, wenn es so gemacht werden könnte wie die Installation eines Themes.

2 „Gefällt mir“

Dashboard.literatecomputing.com installiert Plugins mit wenigen Klicks. Sie können es kostenlos nutzen, indem Sie der kostenlosen Testgruppe beitreten.

4 „Gefällt mir“

@Discourse, Wenn du die Anleitung aktualisieren möchtest, hier ist der funktionierende Code:

Um deine eigenen SSH-Schlüssel für den Zugriff auf ein privates Repository zu verwenden, befolge diese Schritte:

  1. Platziere den privaten SSH-Schlüssel in /var/discourse/shared/standalone/identity/id_rsa (oder an einem anderen Ort, auf den der Container zugreifen kann; wenn du einen anderen Ort wählst, denke daran, den Pfad in der folgenden Vorlage entsprechend zu aktualisieren).

  2. Verwende die folgende Vorlage, um deine Plugins hinzuzufügen:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Private Repo-Zugriff einrichten
          - chown $(whoami) /shared/identity/id_rsa && chmod 600 /shared/identity/id_rsa
          - git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i /shared/identity/id_rsa"

          # Meine privaten Plugins
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Zugriff aufheben
          - git config --global --unset core.sshCommand
5 „Gefällt mir“

Danke für etwas, das ich nicht brauche, aber ich lebe mit dem Einfachen, Ursprünglichen.

Möchten Sie erklären, warum wir Ihr Beispiel verwenden sollten? Liegt es daran:

Verwenden Sie Ihre eigenen SSH-Schlüssel für den Zugriff auf ein privates Repository

1 „Gefällt mir“

Warum nicht einfach ein Token in der URL verwenden?

1 „Gefällt mir“

Nun, wir haben Werkzeuge, um dieses Rätsel zu lösen :winking_face_with_tongue:

Die Nützlichkeit von Container-Konfigurations-Snippets verstehen KI

Jagster:

Warum sollte jemand dieses Snippet in container/app.ym verwenden wollen?

gpt-4o:

Um Ihre Frage effektiv zu beantworten, muss ich den Kontext des spezifischen Snippets in container/app.yml verstehen. Könnten Sie bitte weitere Details oder das eigentliche Snippet angeben, auf das Sie sich beziehen? So kann ich Ihnen eine präzise und hilfreiche Erklärung geben.

Jagster:

Entschuldigung, aber ich brauchte diesen Komponisten.

Dies ist das Snippet:

”””

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Private Repo-Zugriff einrichten
          - chown $(whoami) /shared/identity/id_rsa &amp;&amp; chmod 600 /shared/identity/id_rsa
          - git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i /shared/identity/id_rsa"

          # Meine privaten Plugins
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Zugriff aufheben
          - git config --global --unset core.sshCommand

”””

gpt-4o:

Vielen Dank, dass Sie das Snippet bereitgestellt haben. Dieses YAML-Snippet soll in die Konfigurationsdatei container/app.yml für eine Discourse-Instanz aufgenommen werden. Lassen Sie uns aufschlüsseln, was es tut:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Private Repo-Zugriff einrichten
          - chown $(whoami) /shared/identity/id_rsa &amp;&amp; chmod 600 /shared/identity/id_rsa
          - git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i /shared/identity/id_rsa"

          # Meine privaten Plugins
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Zugriff aufheben
          - git config --global --unset core.sshCommand

Erklärung

  1. Verzeichnis festlegen:

    cd: $home/plugins
    

    Dies ändert das Arbeitsverzeichnis zu dem Ort, an dem Plugins gespeichert sind ($home/plugins).

  2. Zugriff auf private Repositories einrichten:

    - chown $(whoami) /shared/identity/id_rsa &amp;&amp; chmod 600 /shared/identity/id_rsa
    - git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -i /shared/identity/id_rsa"
    
    • Ändert den Besitz des SSH-Privatschlüssels (id_rsa) auf den aktuellen Benutzer und setzt seine Berechtigungen auf 600.
    • Konfiguriert Git so, dass ein benutzerdefinierter SSH-Befehl verwendet wird, der den angegebenen Privatschlüssel verwendet und die Überprüfung des Host-Schlüssels deaktiviert.
  3. Privates Repository klonen:

    - git clone git@example.com:repo/private-discourse-plugin.git
    

    Klonen eines privaten Git-Repositorys, das ein Discourse-Plugin enthält.

  4. SSH-Befehl aufheben:

    - git config --global --unset core.sshCommand
    

    Setzt die Git-SSH-Befehlskonfiguration auf ihren Standardzustand zurück.

Wann und warum dieses Snippet verwendet werden sollte

  1. Private Repositories: Wenn Sie ein privates Discourse-Plugin-Repository haben, das nicht öffentlich zugänglich ist und eine SSH-Schlüssel-basierte Authentifizierung erfordert.

  2. Automatisierung: Dieses Skript hilft bei der Automatisierung des Prozesses der Einrichtung des Zugriffs auf das private Repository, des Klonens und der Sicherstellung, dass die Umgebung anschließend zurückgesetzt wird. Dies ist nützlich für Continuous-Deployment-Setups oder die automatisierte Serverbereitstellung.

  3. Sicherheitsmanagement: Es verwaltet die SSH-Schlüssel sicher (Festlegen von Dateiberechtigungen und anschließendes Aufheben des benutzerdefinierten SSH-Befehls), was für die Aufrechterhaltung der Sicherheit während automatisierter Bereitstellungen von entscheidender Bedeutung ist.

Wichtige Überlegungen

  • Stellen Sie sicher, dass Ihr privater SSH-Schlüssel (id_rsa) sicher verwaltet und nicht offengelegt wird.
  • Überprüfen Sie, ob Besitz und Berechtigungen gemäß Ihren Sicherheitsrichtlinien korrekt festgelegt sind.

Für detailliertere Informationen und Kontexte zu app.yml und Hooks in Discourse finden Sie relevante Discourse-Dokumentation.

Wenn Sie weitere Fragen haben oder zusätzliche Details zur Konfiguration benötigen, fragen Sie einfach!

3 „Gefällt mir“

Hallo! Das klingt großartig! Aber ich weiß nicht, wie ich vorgehen muss, nachdem ich der kostenlosen Testgruppe beigetreten bin! Können Sie mir bitte helfen, @pfaffman? Ich möchte das SAML-Plugin installieren. Es wäre großartig, Literate Computing zu testen, um es installiert und lauffähig zu bekommen!

Danke!

2 „Gefällt mir“

Mein Vorlagen-Snippet ist für Fälle gedacht, in denen Sie keine andere Möglichkeit haben, auf das Git-Repository zuzugreifen, als über einen SSH-Schlüssel (z. B. bei einem selbst gehosteten Git-Repository hinter SSH).

5 „Gefällt mir“