Installare plugin su un sito self-hosted

:warning: Questa guida presuppone che tu abbia un’installazione standard self-hosted. Qui supportiamo solo il metodo di installazione standard, quindi queste istruzioni presuppongono che tu abbia un’installazione standard.

:warning: Questa guida si applica solo alle istanze Discourse self-hosted. Se utilizzi un servizio di hosting gestito, i plugin disponibili sono controllati dal tuo provider di hosting. Ad esempio, sul nostro hosting questi plugin specifici sono disponibili in base al livello di hosting.

In questo tutorial, installeremo il plugin Discourse Solved.

Questo tutorial richiede la comprensione di come utilizzare le repository GitHub, in particolare, come ottenere o copiare l’URL di clonazione git e come modificare i file YAML (*.yml) tramite il terminale usando nano, in particolare come salvare e uscire da nano. I file YAML seguono rigorosamente le indentazioni, quindi assicurati di rispettarle mentre copi e incolli e modifichi il *.yml necessario per la tua istanza Discourse. Usa sempre gli spazi per indentare nei file .yml, non i tab.

  • Copia l’URL di git clone della repository del plugin da GitHub.

  • Accedi al file app.yml del tuo container (presente in /var/discourse/containers/)

    cd /var/discourse
    nano containers/app.yml
    
  • Aggiungi l’URL della repository del plugin al file app.yml del tuo container:

    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
    

    Aggiungi l’URL di git clone del plugin appena sotto la riga contenente git clone https://github.com/discourse/docker_manager.git)

    Segui il formato esistente della riga docker_manager.git; se non contiene sudo -E -u discourse allora inserisci - git clone https://github.com/discourse/discourse-solved.git.

  • Ricostruisci il container:

    cd /var/discourse
    ./launcher rebuild app
    

    Ecco fatto, hai installato con successo il plugin Discourse Solved sulla tua istanza Discourse!


Se il tuo plugin è ospitato in una repository privata

Devi usare un token OAuth:

Con il token OAuth, puoi installare il tuo plugin nello stesso modo di una repository pubblica e non hai bisogno di creare una chiave SSH.

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

Ti consigliamo vivamente di utilizzare i token OAuth per i plugin nelle repository private. Tuttavia, se non puoi, vedi sotto.

Passaggi di installazione privata con chiave SSH
  • Supponendo che la tua repository git privata sia ospitata su GitHub, devi aggiungere la chiave SSH pubblica dell’utente del tuo server alle Chiavi di distribuzione della repository GitHub (https://github.com/SecretOrg/secret-plugin/settings/keys).

  • Modifica il file app.yml come mostrato nell’esempio seguente:

run:
  - exec: echo "Inizio comandi personalizzati"
  
  - 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
           .... ecc ....
        -----END RSA PRIVATE KEY-----
  - file:
      path: /user/.ssh/id_rsa.pub
      chmod: 600
      contents: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tj .... ecc .... 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 "Fine comandi personalizzati"
  • Ricostruisci il container:
cd /var/discourse
./launcher rebuild app

Il tuo plugin privato dovrebbe essere installato sulla tua istanza Discourse.

Come disinstallare un plugin

Per rimuovere un plugin, rimuovi semplicemente la riga - git clone https://github.com/... dal tuo file app.yml e ricostruisci il tuo sito tramite

cd /var/discourse
./launcher rebuild app
173 Mi Piace
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
Wild Apricot login plugin
Formatting toolbar
About the Plugin category
Discourse Mark Plugin
Quick Messages Plugin
Can Plugins Be Added To Basic Docker Install
Daemonite Material Theme
News Plugin :newspaper:
How do i install plugins after doing a fork?
Tickets Plugin :tickets:
"Onebox Assistant", crawl for those previews reliably!
Installing new plugins
Does this software allow admin to put Adsense ads in?
Installing Plugins with Git
Application Files after Digital Ocean Setup
Admin Statistics Report
Discourse BBCode
Install plugins in your non-Docker development environment
Bump Reset plugin - Annotated to help new devs
Projects management plugin
Discord-rolesync plugin
Watching Categories based on on group in discourse
How to ad banners?
How do you add plugins?
LDAP Auth Missing from Plugins
User feedback plugin
Category Page Plugin
Discourse Category Home :house:
Topic Ratings Plugin
Update private plugin without rebuilding the application
Generating lots of Invite Tokens
Discourse Code Review
Discourse Poison Fountain
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
Legal Compliance Plugin
Triggering account creation/login on external service when a user logs in on discourse
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?
Discourse Posthog Plugin
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
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 Video Inline
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:
Search Thumbnails
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
Dumbcourse – Old-browser friendly UI at /dumb (D-pad + small screens)
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?
Discourse Reach and Rights
Not enough space to rebuild
Landing Pages Plugin :small_airplane:
Configure OneLogin's SAML for Discourse
Plugin to Post Anonymous Thread via PN or give anonymous Feedback
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?
Can more than one post be selected as the solution?
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
Unable to rebuild app - failed with exit code 1
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 Signatures
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:
🖼️ Topic Gallery
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
Indisposable Email - block disposable email domains
Discourse-embed-bilibili(在discourse中插入哔哩哔哩视频)
Set user registration IP address API endpoint
Trading Buttons
Installing discourse follow plugin in development (boot_dev) setup — no app.yml file
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
Discourse Points Mall (Check-in, Shop, Orders, Makeup Cards, Ledger)
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
Time Registration plugin
Category Event Policy
Calendar RSVP Posts
Topic List Previews (TLP)
ReplyGif
Discourse User Location
什么时候可以在管理后台直接安装插件?
Gitee 码云登录插件
Upgrading Mathjax to version 4
Updates no longer in the Admin UI?
Email Extension
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
Force specific users through moderation
Homepage Filter plugin
Discourse Group User Status
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
No option appears to choose better answer
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
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)
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?

Ho aggiornato la guida per utilizzare un altro plugin di esempio invece di Discourse Spoiler Alert, che è stato integrato nel core.

Ho usato Discourse Solved, ma fammi sapere se uno diverso sarebbe migliore.

9 Mi Piace

Ho ospitato discourse su Digital Ocean e quando ho usato quel formato mi è apparso questo errore.

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

Poi ho usato questo formato

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

invece di

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 Mi Piace

8 post sono stati spostati in un nuovo argomento: Problemi di formattazione nell’aggiunta di plugin a app.yml

Mi scusi per la domanda stupida, ma come faccio a sapere se è necessario includere sudo -E -u discourse o meno per l’istruzione git clone?

3 Mi Piace

Com’è la tua riga docker_manager?

4 Mi Piace

nessuna delle altre voci nel mio app.yml aveva la parte sudo quindi l’ho omessa e finora ha funzionato

5 Mi Piace
- exec: echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /user/.ssh/config

Sembra che questo metodo non funzioni più.

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

Con il mio repository GIT self-hosted, mi piacerebbe davvero usare le chiavi SSH.

3 Mi Piace

Non dovresti aver bisogno di una chiave ssh nel container, elimina semplicemente questo:

1 Mi Piace

Mi dispiace, non credo di aver capito…

Il mio repository è accessibile tramite SSH. Come posso clonare un plugin senza chiave SSH?

1 Mi Piace

Oh. Forse mi sbaglio. Allora forse devi creare quella directory con le autorizzazioni corrette m

1 Mi Piace

Ciò che confonde è che parte dei comandi negli esempi deve essere eseguita come root e parte come utente discourse. Non sembra essere molto coerente.

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

Al contrario di

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

Farò qualche ricerca nella shell del container in esecuzione.

L’installazione di questo plugin è un po’ complicata. Sarebbe bello se potesse essere resa uguale all’installazione di un tema.

2 Mi Piace

Dashboard.literatecomputing.com installerà i plugin con pochi clic. Puoi usarlo gratuitamente unendoti al gruppo di prova gratuito.

4 Mi Piace

@Discourse, se desideri aggiornare la guida, ecco il codice funzionante:

Per utilizzare le tue chiavi SSH per accedere a un repository privato, segui questi passaggi:

  1. Posiziona la chiave SSH privata in /var/discourse/shared/standalone/identity/id_rsa (o in un’altra posizione accessibile dal container; se scegli una posizione diversa, ricordati di aggiornare il percorso nel modello sottostante di conseguenza).

  2. Utilizza il seguente modello per aggiungere i tuoi plugin:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Imposta l'accesso al repository privato
          - 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"

          # I miei plugin privati
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Rimuovi l'accesso
          - git config --global --unset core.sshCommand
5 Mi Piace

Grazie per qualcosa di cui non ho bisogno, ma vivo con la semplicità originale.

Vuoi spiegare perché dovremmo usare il tuo esempio? È a causa di questo:

usa le tue chiavi SSH per accedere a un repository privato

1 Mi Piace

Perché non usare semplicemente un token nell’URL?

1 Mi Piace

Beh, abbiamo strumenti per risolvere questo enigma :winking_face_with_tongue:

Comprendere l'utilità degli snippet di configurazione del container AI

Jagster:

Perché qualcuno dovrebbe voler usare quello snippet in container/app.ym

gpt-4o:

Per rispondere efficacemente alla tua domanda, ho bisogno di capire il contesto attorno allo snippet specifico in container/app.yml. Potresti fornire maggiori dettagli o lo snippet effettivo a cui ti riferisci? In questo modo, posso darti una spiegazione precisa e utile.

Jagster:

Scusa, ma avevo bisogno di questo composer.

Questo è lo snippet:

”””

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Imposta l'accesso al repository privato
          - 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"

          # I miei plugin privati
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Annulla l'accesso
          - git config --global --unset core.sshCommand

”””

gpt-4o:

Grazie per aver fornito lo snippet. Questo snippet YAML è destinato ad essere incluso nel file di configurazione container/app.yml per un’istanza di Discourse. Analizziamo cosa fa:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          # Imposta l'accesso al repository privato
          - 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"

          # I miei plugin privati
          - git clone git@example.com:repo/private-discourse-plugin.git

          # Annulla l'accesso
          - git config --global --unset core.sshCommand

Spiegazione

  1. Impostazione della directory:

    cd: $home/plugins
    

    Questo cambia la directory di lavoro in cui si trovano i plugin ($home/plugins).

  2. Impostazione dell’accesso al repository privato:

    - 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"
    
    • Cambia la proprietà della chiave privata SSH (id_rsa) all’utente corrente e imposta i suoi permessi a 600.
    • Configura Git per utilizzare un comando SSH personalizzato che utilizza la chiave privata specificata e disabilita il controllo delle chiavi host rigoroso.
  3. Clonazione del repository privato:

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

    Clona un repository Git privato contenente un plugin Discourse.

  4. Annullamento del comando SSH:

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

    Ripristina la configurazione del comando SSH di Git al suo stato predefinito.

Quando e perché usare questo snippet

  1. Repository privati: Se hai un repository di plugin Discourse privato non accessibile pubblicamente che richiede l’autenticazione basata su chiave SSH.

  2. Automazione: Questo script aiuta ad automatizzare il processo di configurazione dell’accesso al repository privato, clonandolo e assicurando che l’ambiente venga resettato in seguito. Questo è utile per configurazioni di distribuzione continua o provisioning automatico del server.

  3. Gestione della sicurezza: Gestisce le chiavi SSH in modo sicuro (impostando i permessi del file e poi annullando il comando SSH personalizzato), fondamentale per mantenere la postura di sicurezza durante le distribuzioni automatizzate.

Considerazioni importanti

  • Assicurati che la tua chiave SSH privata (id_rsa) sia gestita in modo sicuro e non esposta.
  • Verifica che la proprietà e i permessi siano impostati correttamente per le tue policy di sicurezza.

Per informazioni più dettagliate e contesti su app.yml e gli hook in Discourse, puoi consultare la documentazione pertinente di Discourse.

Se hai ulteriori domande o hai bisogno di dettagli aggiuntivi sulla configurazione, non esitare a chiedere!

3 Mi Piace

Ciao! Sembra fantastico! Ma non so come devo procedere dopo essermi unito al gruppo di prova gratuita! Per favore, @pfaffman, potresti aiutarmi? Sto cercando di installare il plugin SAML. Sarebbe fantastico testare Literate Computing per installarlo e farlo funzionare!

Grazie!

2 Mi Piace

Il mio frammento di modello è per quando non si dispone di altri mezzi per accedere al repository Git oltre a una chiave SSH (ad esempio, con un repository Git self-hosted dietro SSH).

5 Mi Piace