CINXE.COM
Install private Composer dependencies | Documentation | SymfonyInsight
<!DOCTYPE html> <html lang="fr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="msapplication-tap-highlight" content="no" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="referrer" content="origin" /> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://insight.symfony.com/build/lib.1f2b2c55.css" /> <link rel="stylesheet" href="https://insight.symfony.com/build/app.67946384.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" /> <style> #doc-search .DocSearch-Button { width: 100%; max-width: 570px; color: #007375; background-color: #ffffff; border: #007375 solid thin; } #doc-search .DocSearch-Search-Icon { color: #007375; } #doc-search .DocSearch-Button-Key { background: #d3e6e7; color: #007375; box-shadow: none; height: 25px; top: 0; margin-right: 3px; padding: 3px; min-width: 25px; } footer { margin-top: 0; } </style> <link rel="stylesheet" href="https://insight.symfony.com/css/docs-builder-theme.css" /> <link href="https://insight.symfony.com/fa/css/all.min.css" rel="stylesheet"> <title>Install private Composer dependencies | Documentation | SymfonyInsight</title> <meta name="description" content="PHP project quality, done right." /> <link rel="apple-touch-icon" sizes="180x180" href="https://insight.symfony.com/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://insight.symfony.com/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="https://insight.symfony.com/favicon-16x16.png"> <link rel="manifest" href="https://insight.symfony.com/site.webmanifest"> <link rel="mask-icon" href="https://insight.symfony.com/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileColor" content="#006769"> <meta name="theme-color" content="#ffffff"> <meta property="og:site_name" content="SymfonyInsight" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://insight.symfony.com" /> <meta property="og:title" content="Install private Composer dependencies | Documentation | SymfonyInsight" /> <meta property="og:description" content="PHP project quality, done right." /> <meta property="og:image" content="https://insight.symfony.com/sharer-default.png" /> <meta property="og:image:width" content="1905" /> <meta property="og:image:height" content="1000" /> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url": "https://insight.symfony.com", "name": "Install private Composer dependencies | Documentation | SymfonyInsight", "description": "PHP project quality, done right.", "funder": { "@type": "Organization", "url": "https://symfony.com", "name": "Symfony" } } </script> <style> .webinar-banner { background: #007375; } .webinar-banner a { display: block; padding: 10px; text-align: center; color: #fff; text-decoration: none; } .webinar-banner a:hover, .webinar-banner a:hover span, .webinar-banner strong { text-decoration: underline; } .webinar-banner span { display: inline-block; padding-right: 15px; color: #fff; } .webinar-banner strong { display: inline-block; padding-left: 15px; } </style> <script async="true" data-browser-key="30e57ea14c0d6fb73470ac106726cfecb7c6278a881a16bd7ebdbbb6794b2e87" data-sample-rate="1.000000" data-parent-trace-id="2debdc317432f6a6d0ffe5f69f2c554f" data-transaction-name="App\Controller\HelpController::sectionAction" data-collector="https://ingest.blackfire.io" src="https://admin.pipeline.blackfire.io/js/probe.js"></script></head> <body class=""> <div id="sln"></div> <header class="header"> <div class="container"> <div class="row align-items-center"> <div class="col-9 col-md-4 text-left mb-0"> <a href="/" title="Back to home"> <img src="https://insight.symfony.com/insight/img/logo-header.svg" alt="SymfonyInsight logo" class="header-logo" /> </a> </div> <div class="col-3 text-right d-md-none"> <button class="btn btn-link text-primary" id="mobile-menu-button"> <i class="fas fa-bars"></i> </button> </div> <div class="d-none d-md-block col-12 col-md-auto ml-0 ml-md-auto" id="mobile-menu-nav"> <ul class="nav nav-pills mt-3 mt-md-0 flex-column align-items-stretch flex-md-row justify-content-md-start"> <li class="nav-item"> <a class="nav-link " href="https://insight.symfony.com/features"> How does it work? </a> </li> <li class="nav-item"> <a class="nav-link " href="https://insight.symfony.com/what-we-analyse"> What we cover </a> </li> <li class="nav-item"> <a class="nav-link active" href="https://insight.symfony.com/docs"> Documentation </a> </li> <li class="nav-item"> <a class="nav-link " href="https://insight.symfony.com/pricing"> Pricing </a> </li> </ul> </div> </div> </div> </header> <div class="container"> <div class="docs"> <div class="text-center mt-5 mb-5"> <h3>Documentation</h3> <br> <div id="doc-search" class="d-flex justify-content-center"></div> </div> <div class="row docs-page"> <div class="col-lg-3"> <div class="docs-page-menu"> <a href="/docs" class="docs-page-menu-home"> <i class="fa fa-book" aria-hidden="true"></i> <span>Doc index page</span> </a> <div id="documentation-menu"> <ul> <li><p><a href="getting-started.html" class="reference internal">Getting started</a></p> <ul> <li><a href="/docs/getting-started/introduction-to-insight.html" class="reference internal">Introduction to SymfonyInsight</a></li> <li><a href="/docs/getting-started/getting-started-as-a-team.html" class="reference internal">Getting started as a team</a></li> <li><a href="/docs/getting-started/getting-started-as-a-freelancer.html" class="reference internal">Getting started as a freelancer</a></li> <li><a href="/docs/getting-started/configuring-insight.html" class="reference internal">Configuring SymfonyInsight</a></li> </ul></li> <li><ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul></li> <li><ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul></li> <li><ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul></li> <li><p><a href="manager.html" class="reference internal">Using SymfonyInsight as a manager</a></p> <ul> <li><a href="/docs/manager/integrate-symfonyinsight-in-your-workflow.html" class="reference internal">Integrate SymfonyInsight in your workflow</a></li> <li><a href="/docs/manager/configure-emails-alerts.html" class="reference internal">Configure e-mails alerts</a></li> <li><a href="/docs/manager/create-printable-reports.html" class="reference internal">Print executive and full quality reports</a></li> </ul></li> <li><p><a href="notifications.html" class="reference internal">Receive notifications</a></p> <ul> <li><a href="/docs/notifications/receive-slack-notifications.html" class="reference internal">Slack notifications</a></li> <li><a href="/docs/notifications/receive-teams-notifications.html" class="reference internal">Microsoft Teams notifications</a></li> <li><a href="/docs/notifications/receive-hipchat-notifications.html" class="reference internal">HipChat notifications</a></li> <li><a href="/docs/notifications/custom-webhook.html" class="reference internal">Configure a custom WebHook</a></li> </ul></li> <li><p><a href="execution-environment.html" class="reference internal">Execution environment</a></p> <ul> <li><a href="/docs/execution-environment/pre-installed-software-and-tools.html" class="reference internal">Pre-installed software and tools</a></li> <li><a href="/docs/execution-environment/enabling-php-extensions.html" class="reference internal">Enabling PHP extensions</a></li> <li><a href="/docs/execution-environment/installing-npm-packages.html" class="reference internal">Installing npm packages</a></li> <li><a href="/docs/execution-environment/installing-debian-packages.html" class="reference internal">Installing Debian packages</a></li> </ul></li> <li><p><a href="how-to.html" class="reference internal">How-To</a></p> <ul> <li><a href="/docs/how-to/install-private-composer-dependencies.html" class="reference internal">Install private Composer dependencies</a></li> <li><a href="/docs/how-to/analyze-projects-not-accessible-by-insight.html" class="reference internal">Analyze projects not accessible by SymfonyInsight</a></li> <li><a href="/docs/how-to/analyze-projects-not-managed-with-git.html" class="reference internal">Analyze projects not managed with Git</a></li> <li><a href="/docs/how-to/connect-to-a-database.html" class="reference internal">Connect to a database</a></li> <li><a href="/docs/how-to/embed-badges-showing-the-project-medal.html" class="reference internal">Embed badges showing the project medal</a></li> <li><a href="/docs/how-to/select-the-repository-branch-to-analyze.html" class="reference internal">Select the repository branch to analyze</a></li> <li><a href="/docs/how-to/ignore-all-violations-for-a-given-rule.html" class="reference internal">Ingore all violations for a given rule</a></li> <li><a href="/docs/how-to/analyze-a-project-using-git-submodules.html" class="reference internal">Analyze a project using Git submodules</a></li> <li><a href="/docs/how-to/add-collaborators-to-a-project.html" class="reference internal">Add collaborators to a project</a></li> <li><a href="/docs/how-to/configure-in-which-directory-my-code-is-located.html" class="reference internal">Configure in which directory my code is located</a></li> <li><a href="/docs/how-to/ignore-a-specific-file-or-directory.html" class="reference internal">Ignore a specific file or directory</a></li> <li><a href="/docs/how-to/integrate-insight-into-phpstorm.html" class="reference internal">Integrate SymfonyInsight into PHPStorm</a></li> </ul></li> <li><p><a href="troubleshooting.html" class="reference internal">Troubleshooting</a></p> <ul> <li><a href="/docs/troubleshooting/report-a-false-positive.html" class="reference internal">Report a false positive</a></li> <li><a href="/docs/troubleshooting/the-tmp-directory-is-not-writable.html" class="reference internal">The /tmp directory is not writable</a></li> <li><a href="/docs/troubleshooting/my-application-is-not-bootable.html" class="reference internal">My application is not bootable</a></li> </ul></li> <li><p><a href="reference.html" class="reference internal">Reference</a></p> <ul> <li><a href="/docs/reference/configuration-options.html" class="reference internal">Configuration options reference</a></li> <li><a href="/docs/reference/sample-configuration-file.html" class="reference internal">Sample configuration file</a></li> </ul></li> <li><p><a href="privacy-and-security.html" class="reference internal">Privacy and security</a></p> <ul> <li><a href="/docs/privacy-and-security/how-does-insight-manage-private-code.html" class="reference internal">How does SymfonyInsight manage private code?</a></li> <li><a href="/docs/privacy-and-security/what-happens-to-my-code-at-project-deletion.html" class="reference internal">What happens to my code at project deletion?</a></li> </ul></li> </ul> </div> </div> </div> <div class="col-lg-9"> <div class="docs-page-content box-shadow bg-white p-4"> <div class="section"> <h1 id="install-private-composer-dependencies"><a class="headerlink" href="#install-private-composer-dependencies" title="Permalink to this headline">Install private Composer dependencies</a></h1> <p>SymfonyInsight relies on Composer to install your project dependencies, meaning it will use Composer authentication features to access your private dependencies. More specifically, SymfonyInsight will use your dedicated SSH private key generated by SymfonyConnect.</p> <p>The aim of this document is to authorize SymfonyInsight to access your private dependencies on the different platforms supported.</p> <div class="section"> <h2 id="analyze-github-projects-with-private-dependencies"><a class="headerlink" href="#analyze-github-projects-with-private-dependencies" title="Permalink to this headline">Analyze GitHub projects with private dependencies</a></h2> <p>The SSH key used to analyze the source code of private GitHub projects is called the <strong>deploy key</strong>. When your project also relies on private dependencies, this deploy key is not enough to install them. In that case you need to setup a new <strong>SSH key</strong> on GitHub website.</p> <ol class="arabic steps"> <li>Click on <a href="https://insight.symfony.com/account/ssh-key" class="reference external">this link</a> to access to the SSH section of your SymfonyConnect account, which is the authentication service used by SymfonyInsight.</li> <li>If the <code translate="no" class="notranslate">Manage your private SSH key</code> section displays a key, copy its contents. Otherwise, click the <code translate="no" class="notranslate">Generate</code> button to create your SSH key and copy its contents.</li> <li>Access to your <a href="https://github.com/settings/keys" class="reference external" rel="external noopener noreferrer" target="_blank">GitHub account SSH settings</a>. Click on the <code translate="no" class="notranslate">New SSH key</code> button, and paste the key copied in the previous step. Give the key a meaningful name (e.g. <code translate="no" class="notranslate">SymfonyInsight</code>) and click the <code translate="no" class="notranslate">Add SSH key</code> button to save the changes.</li> <li>Return to SymfonyInsight and run a new analysis for your private project.</li> </ol> </div> <div class="section"> <h2 id="analyze-gitlab-projects-with-private-dependencies"><a class="headerlink" href="#analyze-gitlab-projects-with-private-dependencies" title="Permalink to this headline">Analyze GitLab projects with private dependencies</a></h2> <p>The SSH key used to create your project should be enough for SymfonyInsight to access your private dependencies. If your have an authentication error, check that the account linked to the SSH private key is allowed to access the dependencies.</p> </div> <div class="section"> <h2 id="how-to-analyze-bitbucket-projects-with-private-dependencies"><a class="headerlink" href="#how-to-analyze-bitbucket-projects-with-private-dependencies" title="Permalink to this headline">How to analyze Bitbucket projects with private dependencies</a></h2> <p>The SSH key used to analyze the source code of private Bitbucket projects is called the <strong>deploy key</strong>. When your project also relies on private dependencies, this deploy key is not enough to install them. In that case you need to setup a new <strong>SSH key</strong> on Bitbucket website.</p> <ol class="arabic steps"> <li>Click on <a href="https://insight.symfony.com/account/ssh-key" class="reference external">this link</a> to access to the SSH section of your SymfonyConnect account, which is the authentication service used by SymfonyInsight.</li> <li>If the <code translate="no" class="notranslate">Manage your private SSH key</code> section displays a key, copy its contents. Otherwise, click the <code translate="no" class="notranslate">Generate</code> button to create your SSH key and copy its contents.</li> <li><p>Access to your Bitbucket account settings, go to the <code translate="no" class="notranslate">SSH Keys</code> section and click on the <code translate="no" class="notranslate">Add key</code> button.</p> <p>Paste the key copied in the previous step and give it a meaningful name (e.g. <code translate="no" class="notranslate">SymfonyInsight</code>). Click the <code translate="no" class="notranslate">Add key</code> button to save the changes.</p></li> <li>Return to SymfonyInsight and run a new analysis for your private project.</li> </ol> </div> <div class="section"> <h2 id="analyze-projects-hosted-on-another-platform-with-private-dependencies"><a class="headerlink" href="#analyze-projects-hosted-on-another-platform-with-private-dependencies" title="Permalink to this headline">Analyze projects hosted on another platform with private dependencies</a></h2> <p>The simplest way to give access to SymfonyInsight to your private dependencies when using the <strong>push mode</strong> for projects not accessible by SymfonyInsight is to include your dependencies in the Git repository of SymfonyInsight.</p> </div> </div> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container text-center"> <div class="pt-5 pb-5"> <div class="mb-1"> <a href="https://insight.symfony.com/features"> How does it work? </a> <a href="https://insight.symfony.com/what-we-analyse"> What we analyze </a> <a href="https://insight.symfony.com/docs"> Documentation </a> <a href="https://insight.symfony.com/pricing"> Pricing </a> </div> <div class="mb-1"> <a href="https://connect.symfony.com/privacy-policy" target="_blank"> Privacy policy </a> <a href="https://insight.symfony.com/terms" target="_blank"> Terms of service </a> </div> <div class="mb-5"> <a href="https://symfony.com/support?product=SLI#products" target="_blank"> Support </a> <a href="https://twitter.com/symfonyinsight" target="_blank"> Follow us on Twitter </a> </div> <img src="https://insight.symfony.com/insight/img/logo-footer.svg" alt="SymfonyInsight logo" class="footer-logo" /> <div class="mt-3"> <small> SymfonyInsight is a trademark of Symfony. All rights reserved. </small> </div> </div> </div> </footer> <script src="https://insight.symfony.com/build/global.b6f1f3cf.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha256-CjSoeELFOcH0/uxWu6mC/Vlrc1AARqbm/jiiImDGV3s=" crossorigin="anonymous"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script> <script type="text/javascript"> docsearch({ appId: 'SLBM2MPP2K', apiKey: 'c4068287268cd5014f5053c8f8d91ee8', indexName: 'insight-symfony', container: '#doc-search', debug: false, }); </script> <script type="text/javascript">var currentUrl = '/docs/how-to/install-private-composer-dependencies.html';</script> <script src="https://insight.symfony.com/js/documentation.js"></script> <link rel="stylesheet" href="https://connect.symfony.com/css/sln.css" /> <script src="https://connect.symfony.com/sln.js?customize_url=https://insight.symfony.com/account/sln_customize.js"></script> </body> </html>