Conversation
|
Thanks for this! @SmsS4 I tried to use |
|
hmmmm this PRis for 1.5 years ago |
|
Thanks for prompt reply! Also it'd be nice to add another function to return only func GetAuth(host string) (goph.Auth, error) {
auth, err := goph.Key(ssh_config.Get(host, "IdentityFile"), "")
if err != nil {
return nil, fmt.Errorf("get key: %w", err)
}
return auth, nil
} |
melbahja
left a comment
There was a problem hiding this comment.
Hey thanks for the PR, can you please use return instead of log fatal.
|
I fixed your comments |
I used your code in new commit By default |
|
Hey thanks for the update, one more thing if you can use v2 of this package I should add more configuration options suport |
I was wondering if it does make sense to return an error in case if Also you'd consider to remove leading and trailing strings.Trim(ssh_config.Get(host, key), "\"") |
|
I will update my fork and use
|
It's probably good idea to use |
|
@melbahja |
|
I'll need a bit of time to test the changes. Thanks. |
|
Can you review these changes ? this pr could really help us. |
|
The
I think you should solve the ssh config problem outside of goph and just pass the hostname, port, and identity to it, and I don't think this is a good think to add it to v1 maybe in v2. |
This pr is to solve #31