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
08e6b875
Commit
08e6b875
authored
Mar 19, 2015
by
David Calavera
Committed by
Michał Górny
May 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return an error when ssh memory credentials are not supported.
To not modify the external api.
parent
7a8b8503
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
include/git2/transport.h
+0
-2
src/transports/cred.c
+6
-2
No files found.
include/git2/transport.h
View file @
08e6b875
...
...
@@ -299,7 +299,6 @@ GIT_EXTERN(int) git_cred_default_new(git_cred **out);
*/
GIT_EXTERN
(
int
)
git_cred_username_new
(
git_cred
**
cred
,
const
char
*
username
);
#ifdef GIT_SSH_MEMORY_CREDENTIALS
/**
* Create a new ssh key credential object reading the keys from memory.
*
...
...
@@ -316,7 +315,6 @@ GIT_EXTERN(int) git_cred_ssh_key_memory_new(
const
char
*
publickey
,
const
char
*
privatekey
,
const
char
*
passphrase
);
#endif
/**
* Signature of a function which acquires a credential object.
...
...
src/transports/cred.c
View file @
08e6b875
...
...
@@ -195,7 +195,6 @@ int git_cred_ssh_key_new(
GIT_CREDTYPE_SSH_KEY
);
}
#ifdef GIT_SSH_MEMORY_CREDENTIALS
int
git_cred_ssh_key_memory_new
(
git_cred
**
cred
,
const
char
*
username
,
...
...
@@ -203,6 +202,7 @@ int git_cred_ssh_key_memory_new(
const
char
*
privatekey
,
const
char
*
passphrase
)
{
#ifdef GIT_SSH_MEMORY_CREDENTIALS
return
git_cred_ssh_key_type_new
(
cred
,
username
,
...
...
@@ -210,8 +210,12 @@ int git_cred_ssh_key_memory_new(
privatekey
,
passphrase
,
GIT_CREDTYPE_SSH_MEMORY
);
}
#else
giterr_set
(
GITERR_INVALID
,
"This version of libgit2 was not built with ssh memory credentials."
);
return
-
1
;
#endif
}
static
int
git_cred_ssh_key_type_new
(
git_cred
**
cred
,
...
...
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