Failed to pull GitHub private repo
I know this has been asked before - but I absolutely don't get how to solve it from the responds.
I got the SSH key from
SSH keys
settings, pasted it to my SSH keys on GitHub.
I use the Devcontainer template, with my own repository URL.
I keep getting an error:
Solution:Jump to solution
ok - someone on Stackoverflow faced the same problem. I was trying to authenticate on the host with
host_name:7080
but once I replaced host_name
with localhost
it just works. I don't know what is happening anymore23 Replies
<#1320899955531059220>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
I also ran
$GIT_SSH_COMMAND
from the container terminal, and it tells me:
running clone from the terminal also fails even though GIT_SSH_COMMAND
is set - I think I'm missing something basic here:
whoops sorry, I didn't see you're using envbuilder
GitHub
Allow passing Git SSH key as an environment variable ยท Issue #333 ยท...
Following up to a discord conversation where an user tries to clone a Git repository via SSH and is met with the following error: envbuilder v1.0.0-rc.6+23d086e - Build development environments fro...
If I do that can I still use the template through?
yes
I should mention I'm not very smart. But from my perspective I put in a name, github URL (ssh), my github account has Coder SSH set. I click green button and it starts working. So my decision points are literally - SSH key and URL. Next part where I can change anything is .devcontainer folder with Dockerfile and everything else - but I can't get this far :c since I cannot clone the repository.
I see the workaround description to just download the key to the environment - I just have no idea where in this user-scenario I can achieve it.
use external Auth
And set token for envbuilder
you should setup external Auth for Coder agent first
you mean in the .tf file of my template? I can't change anything there. Publish is grayed out and nothing I do here's saved
build it before publish
ok so I guess i'd do this here - but how?
This
Build
works like every 10th time I click it, and keeps spitting 500 error to my browser console without any other feedback on what's wrongthere is a link to document on that page
what is message of 500 error?
It stopped with 500 - now it just keeps saying it cannot connect for logs
and the thing keeps spinning and build never stops Running
I've set the external Auth, I added the thing to .tf file, both environment variable
"ENVBUILDER_GIT_USERNAME" : data.coder_external_auth.github.access_token,
and the external auth. And I still get the same exact error:
this says we're good, I click the test, it says we're good. So what's wrong now?
Ok so OAuth will never work with pulling repo through ssh - but with HTTPS it works.
But I still want to know how to set up the alternative - pushing the SSH in a file.
yeb, envbuilder doesn't use ssh setup by coder agent. If you want to use ssh to clone repo for envbuilder, pass ssh private key through (or similar, check on their docs)
hey @Some Dinosaur, did you figure it out?
I haven't got a chance to try passing the raw key yet.
Ok, I tried to set up the same thing that worked with OAuth on a different machine. Now every time I click
Click to Login
I get:
Solution
ok - someone on Stackoverflow faced the same problem. I was trying to authenticate on the host with
host_name:7080
but once I replaced host_name
with localhost
it just works. I don't know what is happening anymorenice, this is still pretty weird though
@Phorcys closed the thread.