Cannot push with an ssh alias - failed to resolve address
Hi,
Thank you so much for gitui. I cannot push from gitui, always getting the error -
[ERROR] push error: git error:failed to resolve address for github.com-foo: Name or service not known; class=Net (12)
But git push works fine from the cmdline. I have in my .ssh/config the alias -
Host github.com-foo HostName github.com
Is there a way around this ?
I am using version gitui v0.11.0 on Ubuntu 18.04
thx, -m
@extrawurst Does git2-rs using libgit2 also bring in libssh ?
Yeah - i am having the same issue
I found a way around this error message by changing the host in my ssh config from github.com-foo to foo.github.com, but now it hangs up, repeating in the logs:
15:23:05 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:352] update
15:23:05 [TRACE] (6) mio::poll: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/poll.rs:478] registering event source with poller: token=Token(0), interests=READABLE
15:23:05 [TRACE] (6) mio::poll: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13/src/poll.rs:478] registering event source with poller: token=Token(1), interests=READABLE
15:23:05 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 89737437399671470] (type: WorkingDir)
15:23:05 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 11904231227679536291] (type: Stage)
15:23:05 [TRACE] (5) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 11904231227679536291 (type: Stage)
15:23:05 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:05 [TRACE] (2) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 89737437399671470 (type: WorkingDir)
15:23:05 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:07 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:280] event: Input(Key(KeyEvent { code: Char('f'), modifiers: NONE }))
15:23:07 [TRACE] (1) asyncgit::fetch: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/fetch.rs:70] request
15:23:07 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:352] update
15:23:07 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 4284137435065681905] (type: WorkingDir)
15:23:07 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 11035345982447737487] (type: Stage)
15:23:07 [TRACE] (2) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 11035345982447737487 (type: Stage)
15:23:07 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:07 [TRACE] (3) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 4284137435065681905 (type: WorkingDir)
15:23:07 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:10 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:352] update
...
15:23:35 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:352] update
15:23:35 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 14911695346240988513] (type: WorkingDir)
15:23:35 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 16499679971357477691] (type: Stage)
15:23:35 [TRACE] (5) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 16499679971357477691 (type: Stage)
15:23:35 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:35 [TRACE] (3) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 14911695346240988513 (type: WorkingDir)
15:23:35 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:40 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:352] update
15:23:40 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 3477886633936259483] (type: WorkingDir)
15:23:40 [TRACE] (1) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:95] request: [hash: 14388519014811246931] (type: Stage)
15:23:40 [TRACE] (3) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 14388519014811246931 (type: Stage)
15:23:40 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:40 [TRACE] (2) asyncgit::status: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/asyncgit-0.17.0/src/status.rs:151] status fetched: 3477886633936259483 (type: WorkingDir)
15:23:40 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:371] update_async: Git(Status)
15:23:41 [TRACE] (1) gitui::app: [/home/viridi/.cargo/registry/src/github.com-1ecc6299db9ec823/gitui-0.17.0/src/app.rs:280] event: Input(Key(KeyEvent { code: Char('c'), modifiers: CONTROL }))
using gitui 0.17.0
@ViridiCanis what does hangup mean exactly?
I used pull instead of push compared to OP, and it says "Pull" "preparing". the loading symbol top left next to status keeps moving, but nothing else happens
I used pull instead of push compared to OP, and it says "Pull" "preparing". the loading symbol top left next to status keeps moving, but nothing else happens
hm I never had these issues. so I depend on you to help me on this. I pushed to a branch debug-496-fetch and if you build from this and run with logging could you provide me with the full log? feel free to send it to me via email if you don't want to paste it here or on gist.
pull at 16:34:25 gitui.log
I changed my setup to use keychain in my shell's startup script, and gitui works normally. Still don't know how to fix it with only using ssh-agent.
Hi,
hm I never had these issues. so I depend on you to help me on this.
Do you have a .ssh/config with a Host entry that is not a real hostname ? I have an arbitrary label for Host that will never resolve to a network address. git tools use the Hostname entry for this label. I get a feeling this indirection is not happening here ?? Just guessing at that though. thx, -m
Same Issue here, gitui 0.16.2
Same here 0.18.0
Same here 0.19.0
@mckellygit I can't find anything conclusive here but it seems libssh2 is not reading the config and applying these aliases
I changed my setup to use
keychainin my shell's startup script, and gitui works normally. Still don't know how to fix it with only using ssh-agent.
@ViridiCanis Hey, could you please provide more info on how to do that?
@Phl3gmaTREEc sorry, it's been a while since I used it and I can't get it to work again. It should just be installing keychain and adding keychain -q --eval [list of keys] | eval to your shell's startup script.
But currently I'm getting problems with gitui (git cli works), where with my normal key without alias, there is an auth sock problem (also affects ssh-add) and with my other one with alias it is the same as original issue.
@extrawurst I agree. Maybe see - https://github.com/libgit2/libgit2/issues/4338 Could maybe one day libssh be used instead ? I will try to look around. thx.
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
I can still reproduce this in 0.21.0
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
AFAIK it's still relevant
https://github.com/libgit2/libgit2/pull/6617 - soon supported by upstream
This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
Still relevant. What's the status of implementation if the libgit2 library integrates OpenSSH support?