-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitlab SSH key: permission denied from within dev container #9
Comments
ANALYSIS
RESOLUTIONThere is no issue as such. To be able to communicate with Gitlab from within the dev container without having to do " ssh-add ~/.ssh/id_rsa" after each reboot, follow these steps:
|
Perhaps it's worth reopening that issue until the "resolution" gets incorporated in the Readme's optional set-up steps for users of SSH Keys with passphrases? |
@tanguyNaets It's technically already in the README as one of the one-time setup steps (cf. line 21 for GitLab and line 39 for GitHub). But perhaps we should make it more clear in the README that this step is very much necessary for a good experience. |
Description
When inside a dev-container, it is not possible to push/pull/communicate with Gitlab until the command "ssh-add ~/.ssh/<your_key>" (e.g. ssh-add ~/.ssh/id_rsa) is performed: we get "Permission denied" without the possibility to enter a passphrase. For example:
⬢ [Docker] ❯ ssh -T git@gitlab.com
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
Outside the dev container, even without doing the command "ssh-add ~/.ssh/<your_key>", it is possible to interact with Gitlab but the passphrase is required every time. For example:
(base) raphaelpeschi@Raphaels-MBP or-tools-test % ssh -T git@gitlab.com
Enter passphrase for key '/Users/raphaelpeschi/.ssh/id_rsa':
Welcome to GitLab, @Raphael85!
Reproduction
root in app on main [!] is 📦 v0.0.0 via 🐍 v3.8.12
⬢ [Docker] ❯ ssh -T git@gitlab.com
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
Workarounds
Method 1) Push/pull from outside the container (e.g. open a new terminal outside VSCode)
Method 2) After each laptop reboot, perform the command "ssh-add ~/.ssh/<your_key>" outside the dev container. This will allow to interact with Gitlab without entering the passphrase, both outside and within dev containers.
The text was updated successfully, but these errors were encountered: