kas: add GIT_CREDENTIAL_HELPER environment variable
This allows to set a git credential helper in the .gitconfig, in order to handle git authentications. For instance when bitbake recipes require to clone from git via https. Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
b250c341fb
commit
71e7f5523d
@ -68,5 +68,9 @@ Environment variables
|
|||||||
| ``AWS_CONFIG_FILE`` | Path to the awscli configuration and credentials |
|
| ``AWS_CONFIG_FILE`` | Path to the awscli configuration and credentials |
|
||||||
| |aws_cred| | file that are copied to the kas home dir. |
|
| |aws_cred| | file that are copied to the kas home dir. |
|
||||||
+-----------------------+-----------------------------------------------------+
|
+-----------------------+-----------------------------------------------------+
|
||||||
|
| |git_cred| | Allows to set the git credential helper in the |
|
||||||
|
| | `.gitconfig` of the kas user. |
|
||||||
|
+-----------------------+-----------------------------------------------------+
|
||||||
|
|
||||||
.. |aws_cred| replace:: ``AWS_SHARED_CREDENTIALS_FILE``
|
.. |aws_cred| replace:: ``AWS_SHARED_CREDENTIALS_FILE``
|
||||||
|
.. |git_cred| replace:: ``GIT_CREDENTIAL_HELPER``
|
||||||
|
@ -164,6 +164,11 @@ class SetupHome(Command):
|
|||||||
fds.write('[User]\n'
|
fds.write('[User]\n'
|
||||||
'\temail = kas@example.com\n'
|
'\temail = kas@example.com\n'
|
||||||
'\tname = Kas User\n')
|
'\tname = Kas User\n')
|
||||||
|
if os.environ.get('GIT_CREDENTIAL_HELPER', False):
|
||||||
|
fds.write('[credential]\n'
|
||||||
|
'\thelper = '
|
||||||
|
+ os.environ.get('GIT_CREDENTIAL_HELPER')
|
||||||
|
+ '\n')
|
||||||
|
|
||||||
if os.environ.get('AWS_CONFIG_FILE', False) \
|
if os.environ.get('AWS_CONFIG_FILE', False) \
|
||||||
and os.environ.get('AWS_SHARED_CREDENTIALS_FILE', False):
|
and os.environ.get('AWS_SHARED_CREDENTIALS_FILE', False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user