-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Config #34
base: master
Are you sure you want to change the base?
Add Config #34
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
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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