Closed lburgazzoli closed 1 year ago
@lburgazzoli are you using an ssh-agent
? Currently sheldon only supports authentication over ssh when there is an ssh-agent
present. As far as I understand SSH with github always requires authentication even just to clone a public repository.
Yes I have the ssh-agent running (on OSX)
➜ ps -ef | grep ssh-agent
501 1944 1 0 Tue06PM ?? 0:03.39 /usr/bin/ssh-agent -l
My ssh config is like:
Host github.com
HostName ssh.github.com
Port 443
User lburgazzoli
IdentityFile ~/.ssh/github
Just saw this - you need the ssh agent env vars on any shell that you run, so it makes sense to eval $(ssh-agent)
before sheldon, other wise it won't be able to find the agent.
Also on macOS I do this:
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519```
@tyronick o great, that works !
@rossmacarthur I am encountering this issue as well but as i am accessing my server via ssh this does not work. I am able to access github via ssh directly but not via sheldon.
❯ ssh git@github.com
PTY allocation request failed on channel 0
Hi qnlbnsl! You've successfully authenticated, but GitHub does not provide shell access.
Connection to ssh.github.com closed.
❯ exec zsh
Loaded ~/.config/sheldon/plugins.toml
error: failed to install source `https://github.com/ohmyzsh/ohmyzsh`
due to: failed to git clone `https://github.com/ohmyzsh/ohmyzsh`
due to: failed to connect to github.com: Operation timed out; class=Os (2)
@qnlbnsl your config is trying to access github over https. If access via https is not allowed on the server this won't work. If you intend to clone repos using ssh you will need to modify your sheldon config file. See the documentation https://sheldon.cli.rs/Configuration.html#cloning-with-git-or-ssh-protocols
My plugin setup is as follow:
When I run
sheldon lock --update
, the process ends after a long time with the following error:This seems to be caused by the fact that in my git configuration, I always use ssh to access git repos:
If I remove the mapping above, then the command succeed.