...
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
in @/sal/git/git_executor.rs
|
||||
|
||||
create a GitExecutor which is the one executing git commands
|
||||
and also checking if ssh-agent is loaded
|
||||
or if there is an authentication mechanism defined in redis
|
||||
|
||||
how is this done use src/env/redisclient.rs
|
||||
this allows us to execute redis commands
|
||||
|
||||
check there is herocontext:git in the redis
|
||||
|
||||
if yes fetch the object, its a json representing a struct
|
||||
|
||||
- status (error, ok) as enum
|
||||
- auth which is a map
|
||||
- key is the server part of our git url (see parse_git_url in git module)
|
||||
- val is another object with following properties
|
||||
- sshagent as bool (means if set just use loaded sshagent)
|
||||
- key (is the sshkey as needs to be used when talking to the server)
|
||||
- username (if username then there needs to be a password)
|
||||
- password
|
||||
|
||||
we need to deserialize this struct
|
||||
|
||||
this now tells based on the server name how to authenticate for the git server
|
||||
|
||||
if sshagent then rest needs to be empty
|
||||
if key rest needs to be empty
|
||||
if username then password set, rest empty
|
||||
|
||||
|
||||
the git executor needs to use above to talk in right way to the server
|
Reference in New Issue
Block a user