Résoudre les problèmes d'installation courants dans Cloud Code pour IntelliJ
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Comment puis-je corriger les erreurs de type "fichier exécutable introuvable sur PATH" ?
Pendant le déploiement ou le développement continu, vous pourriez obtenir des erreurs sous la forme executable file not found in $PATH.
Exemple :
time="2018-11-01T12:46:38-04:00" level=fatal msg="exiting dev mode because the first build failed: building [gcr.io//my-proj]: tagging: pushing: getting auth config for gcr.io//my-proj:3c275201-dirty-50f870d: getting auth config: error getting credentials - err: exec: "docker-credential-gcr": executable file not found in $PATH, out: ``"
Vous pourriez ensuite être confronté au problème où l'EDI n'hérite pas des variables d'environnement shell. Cela peut se produire dans certains environnements Linux lorsque les variables PATH sont définies dans .bash_profile ou .bash_rc et que l'IDE est lancé à partir de l'IUG, empêchant l'IDE de voir les variables PATH.
Pour résoudre ce problème, vous pouvez autoriser Cloud Code à gérer automatiquement les mises à jour des dépendances gcloud CLI et Kubernetes à l'aide des paramètres Cloud Code de votre IDE (Fichier > Paramètres > Outils > Cloud Code > Kubernetes ou, pour Mac OS X, IntelliJ IDEA > Préférences > Outils > Cloud Code > Kubernetes).
Si vous souhaitez conserver des versions personnalisées de ces dépendances, vous pouvez résoudre ce problème sous Linux à l'aide de la solution suivante :
Lancez l'EDI depuis le terminal.
Tout d'abord, suivez ces instructions pour activer un lanceur de ligne de commande. Puis, lancez l'IDE depuis le terminal.
Par exemple, pour lancer IntelliJ IDEA à partir du terminal, accédez au projet que vous souhaitez ouvrir, puis exécutez :
idea .
De même, pour lancer PyCharm, exécutez :
charm .
Vous pouvez également définir les variables PATH dans un emplacement système, tel que /etc/environment.
Diagnostiquer et signaler un problème
Si votre problème n'est pas traité dans ce document, essayez de trouver une solution en appliquant les suggestions ci-dessous :
Rejoindre le canal #cloud-code, qui fait partie de la communauté SlackGoogle Cloud , et poser des questions sur le problème. Un des membres de la communauté pourra peut-être vous aider à identifier le problème.
Si vous ne parvenez pas à résoudre le problème après l'avoir diagnostiqué, vous pouvez le signaler dans l'IDE IntelliJ :
Cliquez sur Tools > Cloud Code > Help / About > Submit feedback or report an issue (Outils > Cloud Code > Aide/À propos > Envoyer des commentaires ou signaler un problème). Vous serez alors invité à signaler un problème sur GitHub.
Suivez le modèle présenté dans le champ de signalement pour décrire le problème.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThe "executable file not found in $PATH" error often occurs when an IDE launched from a GUI doesn't inherit shell environment variables.\u003c/p\u003e\n"],["\u003cp\u003eThis issue can be resolved by letting Cloud Code automatically manage updates to gcloud CLI and Kubernetes dependencies within the IDE settings.\u003c/p\u003e\n"],["\u003cp\u003eAlternatively, launching the IDE from the terminal using its command-line launcher can resolve the issue by ensuring the IDE uses the current environment variables.\u003c/p\u003e\n"],["\u003cp\u003eAnother method is to set the PATH variables in a system-wide location, such as \u003ccode\u003e/etc/environment\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot common installation issues in Cloud Code for IntelliJ\n\nHow do I fix 'executable not found on PATH' errors?\n---------------------------------------------------\n\nIf, during deployment or continuous development, you are getting errors in the\nform of `executable file not found in $PATH`.\n\nFor example: \n\n```\ntime=\"2018-11-01T12:46:38-04:00\" level=fatal msg=\"exiting dev mode because the first build failed: building [gcr.io//my-proj]: tagging: pushing: getting auth config for gcr.io//my-proj:3c275201-dirty-50f870d: getting auth config: error getting credentials - err: exec: \"docker-credential-gcr\": executable file not found in $PATH, out: ``\"\n```\n\n\u003cbr /\u003e\n\nThen, you may be running into the problem where the IDE is not inheriting the\nshell environment variables. This can happen in some Linux environments when\nthe `PATH` variables are defined in `.bash_profile` or `.bash_rc` and the\nIDE is launched from the GUI, causing the IDE not to see the `PATH` variables.\n\nThis can be solved by allowing Cloud Code to automatically manage\nupdates to gcloud CLI and Kubernetes dependencies, using the Cloud Code\nsettings within your IDE (**File** \\\u003e **Settings** \\\u003e **Tools** \\\u003e **Cloud Code** \\\u003e\n**Kubernetes** or for Mac OS X, **IntelliJ IDEA** \\\u003e\n**Preferences** \\\u003e **Tools** \\\u003e **Cloud Code** \\\u003e **Kubernetes**).\n\nIf you'd like to maintain custom versions of these dependencies, you can\nsolve this issue in Linux using the following workaround:\n\n- Launch the IDE from the terminal\n\n First, follow these instructions to enable a command-line launcher. Then\n launch the IDE from the terminal.\n\n For example, to launch IntelliJ IDEA from the terminal, navigate to\n the project you wish to open, then execute: \n\n idea .\n\n Similarly, to launch PyCharm, execute: \n\n charm .\n\n- Alternatively, set the `PATH` variables in a system-wide location such\n as /etc/environment.\n\nDiagnosing and reporting an issue\n---------------------------------\n\nIf your issue isn't covered in this doc, try finding a resolution to the issue\nby:\n\n- Searching the [Cloud Code for IntelliJ GitHub issues](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues?q=is%3Aissue+)\n and/or [StackOverflow](https://stackoverflow.com/search?q=%5Bgoogle-cloud-code%5D)\n for a similar problem\n\n- Joining the [`#cloud-code`](https://googlecloud-community.slack.com/messages/cloud-code/)\n channel, which is part of the [Google Cloud Slack community](https://join.slack.com/t/googlecloud-community/shared_invite/zt-2mz6i6j8l-qMC13DEg6FAtGMH4wVytTA),\n and asking about the issue, where one of the community members may be able to\n identify the problem\n\nIf you couldn't resolve the issue after trying to diagnose it, then you can\nreport the issue in the IntelliJ IDE:\n\n1. Click **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit feedback or\n report an issue**. This prompts you to report an issue on GitHub.\n\n2. Follow the template in the issue reporting box to describe the issue."]]