Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
0972443c
Commit
0972443c
authored
Sep 05, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2553 from libgit2/cmn/ssh-errors
ssh: store error message immediately after a failed agent call
parents
89e05e2a
2dc399a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
src/transports/ssh.c
+7
-1
No files found.
src/transports/ssh.c
View file @
0972443c
...
...
@@ -292,6 +292,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_cred_ssh_key *c) {
}
shutdown:
if
(
rc
!=
LIBSSH2_ERROR_NONE
)
ssh_error
(
session
,
"error authenticating"
);
libssh2_agent_disconnect
(
agent
);
libssh2_agent_free
(
agent
);
...
...
@@ -305,6 +309,7 @@ static int _git_ssh_authenticate_session(
int
rc
;
do
{
giterr_clear
();
switch
(
cred
->
credtype
)
{
case
GIT_CREDTYPE_USERPASS_PLAINTEXT
:
{
git_cred_userpass_plaintext
*
c
=
(
git_cred_userpass_plaintext
*
)
cred
;
...
...
@@ -361,7 +366,8 @@ static int _git_ssh_authenticate_session(
return
GIT_EAUTH
;
if
(
rc
!=
LIBSSH2_ERROR_NONE
)
{
ssh_error
(
session
,
"Failed to authenticate SSH session"
);
if
(
!
giterr_last
())
ssh_error
(
session
,
"Failed to authenticate SSH session"
);
return
-
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment