-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Include remote error when pure SSH protocol fails #5674
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Right now, if spawning the remote command fails for some reason, we get a message like the following in the trace output: pure SSH protocol connection failed: Unable to negotiate version with remote side (unable to read capabilities): EOF However, all we know is that we failed to connect to the remote `git-lfs-transfer` process. That could be for any number of reasons: the remote program doesn't exist or is not in `PATH`, the user has misconfigured something locally or remotely, or any number of other problems. We won't know unless we log the output, so let's do that so we can get more information.
60f8360 to
5dbbf13
Compare
chrisd8088
approved these changes
Mar 12, 2024
Member
chrisd8088
left a comment
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.
Looks good, thanks!
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Oct 22, 2024
With PR git-lfs#4446 we defined a new SSHTransfer structure and set of methods on that structure in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file, in order to format and output an error message from the startConnection() function. As it happens this function is not one of the methods of the SSHTransfer structure, and so there was no conflict with the methods' "tr" receiver variables. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable, which we can not do with the current name of the "tr" receiver variable, as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Oct 23, 2024
With PR git-lfs#4446 we defined a new SSHTransfer structure and set of methods on that structure in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file, in order to format and output an error message from the startConnection() function. As it happens this function is not one of the methods of the SSHTransfer structure, and so there was no conflict with the methods' "tr" receiver variables. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable, which we can not do with the current name of the "tr" receiver variable, as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Oct 29, 2024
With PR git-lfs#4446 we defined a new SSHTransfer structure and set of methods on that structure in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file, in order to format and output an error message from the startConnection() function. As it happens this function is not one of the methods of the SSHTransfer structure, and so there was no conflict with the methods' "tr" receiver variables. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable, which we can not do with the current name of the "tr" receiver variable, as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 1, 2024
With PR git-lfs#4446 we defined a new SSHTransfer structure and set of methods on that structure in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file, in order to format and output an error message from the startConnection() function. As it happens this function is not one of the methods of the SSHTransfer structure, and so there was no conflict with the methods' "tr" receiver variables. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable, which we can not do with the current name of the "tr" receiver variable, as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 3, 2024
With PR git-lfs#4446 we defined a new SSHTransfer structure and set of methods on that structure in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file, in order to format and output an error message from the startConnection() function. As it happens this function is not one of the methods of the SSHTransfer structure, and so there was no conflict with the methods' "tr" receiver variables. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable, which we can not do with the current name of the "tr" receiver variable, as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 4, 2024
In PR git-lfs#4446 we defined a new SSHTransfer structure and a set of methods for it in our ssh/connection.go source file, and used the name "tr" for the receiver variables of those methods. Later, in commit 5dbbf13 of PR git-lfs#5674, we imported our "tr" message translation package into the same source file in order to format and localize an error message generated by the startConnection() function. Because this function is not one of the methods of the SSHTransfer structure there was no conflict with the "tr" receiver variables of those methods. However, in subsequent commits in this PR we expect to revise one of the SSHTransfer structure's methods to output an error message, and will want to use the Get() method of the "tr" package's global Tr variable. We are not able to do this with the current name of the "tr" receiver variable as it masks the "tr" package name within the method's scope. Therefore we now rename all our "tr" receiver variables to "st" in the ssh/connection.go source file, so as to avoid any namespace conflicts with our "tr" package.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, if spawning the remote command fails for some reason, we get a message like the following in the trace output:
pure SSH protocol connection failed: Unable to negotiate version with remote side (unable to read capabilities): EOF
However, all we know is that we failed to connect to the remote
git-lfs-transferprocess. That could be for any number of reasons: the remote program doesn't exist or is not inPATH, the user has misconfigured something locally or remotely, or any number of other problems. We won't know unless we log the output, so let's do that so we can get more information.