dev-environments
dev-environments copied to clipboard
Can't create dev environment with private GitHub repository
Describe the bug I can't create dev env with private GitHub repo
To Reproduce Steps to reproduce the behavior:
- Go to 'Dev Environnements'
- Fill create field with private GitHub repo
- Click on 'Create button'
- See error
Expected behavior Successful creation of dev env
Desktop (please complete the following information):
- OS: OS X
- Version 12.0 Beta (21A5248p)
Hi @DewZ89
In step 4, what is the error you see?
Can you also please follow the instructions here to upload a diagnostics report: https://docs.docker.com/docker-for-windows/troubleshoot/#diagnose-and-feedback ?
Hello @rumpl,
~~As I'm also seeing this issue on the latest version of macOS Big Sur + latest version of Docker for Mac, I noticed that the diagnostics are only possible for Docker for Windows, not for the macOS version, so those steps won't work here.~~
EDIT: The link was for Windows and I somehow missed the Get Support
button, my bad!
I can clone my private repositories locally just fine, but Docker doesn't seem to have access to ~/.ssh
, as the authentication is failing.
- Entered
[email protected]:<user>/<repo>.git
into the input field and hit theCreate
button. - Clicked the created Dev Environment and saw the following in the logs:
Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
@rumpl Sorry about that, edited the previous message to correct myself.
Here's my diagnostics ID in case it helps: 6D252ED7-F5C4-4642-8C2B-189FB7322DBC/20210628103808
Figured it out!
Apparently I just needed to add the SSH key to the SSH agent, which I've actually never had to do before, but it makes sense in hindsight:
ssh-add $HOME/.ssh/id_rsa
Glad you made it work! We'll update the docs, add a paragraph about cloning over SSH.
@DewZ89 could you try and do the same thing @Dids did and tell us if that worked for you?
@DewZ89 if you fancy giving us some direct feedback or chatting to the team on a call drop me an email on [email protected] :D
I have the same problem with private repo but on Self-Hosted Gitlab. I'm using Windows 10.
PS C:\Projekty\TMP> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 19041 0
PS C:\Projekty\TMP>
SSH Agent is running:
PS C:\Users\dawid> Get-Service ssh-agent
Status Name DisplayName
------ ---- -----------
Running ssh-agent OpenSSH Authentication Agent
PS C:\Users\dawid>
and the key is added:
PS C:\Users\dawid> ssh-add -L
ssh-ed25519 XXXXXXXXXXXXXX gitlab-ssh-key
PS C:\Users\dawid>
and I can clone the repo:
PS C:\Projekty\TMP> git clone git@XXXXXXXXX:dawidp/toshi.git
Cloning into 'toshi'...
remote: Enumerating objects: 18, done.
remote: Total 18 (delta 0), reused 0 (delta 0), pack-reused 18
Receiving objects: 100% (18/18), 17.95 KiB | 1.99 MiB/s, done.
Resolving deltas: 100% (4/4), done.
PS C:\Projekty\TMP>
but when I try to launch Dev Environments in Docker Desktop I get this error:
Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
git@XXXXXXXXX: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Issue was closed automatically because we merged a PR on this subject. Still a work in progress
I have the same problem. I added ssh key with ssh-add
but still does not work with private repo on macOS.
@DewZ89 if you fancy giving us some direct feedback or chatting to the team on a call drop me an email on [email protected] :D
Hi @nebuk89 Sorry for my late reply. i updated Docker Desktop yesterday, let me try again and I make you a feedback.
I think I have the latest version 6.5.2 (also there is no way to check version) and the problem stil occurs.
~I'm unable to clone from an internal - what some might call "private" repo (but not private in terms of GH repo permissions) accessible through a corp VPN.~
EDIT: What I'm experiencing must be a separate issue, so let's track it as such: #35.
@DewZ89 @dawidp @bounlu we just released a new version of Docker Desktop 3.6.0
, can you install it by clicking on the Check for Updates
menu and check if the issue is resolved with this new version?
You can also check that your ssh configuration is working well by cloning the repository locally (via ssh of course 😅)
Sure @glours
@glours I still get the same error message

@glours same for me
I have the same problem. I added ssh key with
ssh-add
but still does not work with private repo on macOS.
@bounlu you're mentioning ssh
but you are using an https
git url, can you try with the ssh url of the git repo instead?
I have the same problem. I added ssh key with
ssh-add
but still does not work with private repo on macOS.@bounlu you're mentioning
ssh
but you are using anhttps
git url, can you try with the ssh url of the git repo instead?
@glours ohh right, my bad. It works with ssh
. thanks. 👍
Using https protocol get this error:
Preparing to clone inside a volume Installing credential helpers... done Cloning into '/code'... fatal: unable to access 'https://rhodecode.mycompany.com/myproduct/myservice/': SSL certificate problem: unable to get local issuer certificate exit code 128
I have added the ssh keys and agent running but this problem seems to be related with certificates. I have put ca.crt (but no other) into my $HOME/.docker/certs.d/rhodecode.mycompany.com folder and restarted the docker desktop (v3.5.2) but that didn't help.
I have a similar issue with https, it does not recognize the string between https:// and @ as a username and tries to resolve that as a dns name.
I also cannot connect to an organizational repository using https as the server uses a self-signed organizational root certificate.
Error presented during step 3 - Preparing:
Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
fatal: unable to access 'https://myurl.com/myrepo.git/': SSL certificate problem: self signed certificate in certificate chain
exit code 128
ssl cloning is disabled on the server so that is not an option.
I had a similar problem, where I would get the error "Host key verification failed." with no other information. After trying a large number of things (both in Windows PowerShell and WSL Bash), I finally stumbled upon a solution. I was trying to set up a dev environment for a private BitBucket repository, and although I had set up my SSH key in BitBucket, I had not yet cloned the repository outside of setting up dev environments in Docker. The solution was to either 1) clone the code locally (which will prompt you for accepting the host key), or 2) do ssh-keyscan bitbucket.org
and add that to ~\.ssh\known_hosts
(in WINDOWS).
But... now it just gets stuck forever on "Cloning into '/com.docker.devenvironments.code'..." :(
But... now it just gets stuck forever on "Cloning into '/com.docker.devenvironments.code'..." :(
Can confirm, also experiencing this issue on Docker Desktop v4.16.3, Windows 10 Pro 22H2.
SSH key and everything working when I try to clone locally manually using the relevant Git commands.
@STBoyden I had the same problem with that exact version of windows. Follow the instructions here to add an ssh key. Start docker Then you can use the https link of the git repo when setting up the dev enviroment. (I got the same error when I tried using ssh details [email protected]... to setup the dev env) That's it. It should work. docker desktop version: 4.22.0