MCPcopy Index your code
hub / github.com/aws/aws-cli / write_git_parameters

Method write_git_parameters

awscli/customizations/codecommit.py:114–127  ·  view source on GitHub ↗
(self, signature)

Source from the content-addressed store, hash-verified

112 return 0
113
114 def write_git_parameters(self, signature):
115 username = self._session.get_credentials().access_key
116 if self._session.get_credentials().token is not None:
117 username += "%" + self._session.get_credentials().token
118 # Python will add a \r to the line ending for a text stdout in Windows.
119 # Git does not like the \r, so switch to binary
120 with NonTranslatedStdout() as binary_stdout:
121 binary_stdout.write(f'username={username}\n')
122 logger.debug('username\n%s', username)
123 binary_stdout.write(f'password={signature}\n')
124 # need to explicitly flush the buffer here,
125 # before we turn the stream back to text for windows
126 binary_stdout.flush()
127 logger.debug('signature\n%s', signature)
128
129 def read_git_parameters(self):
130 parsed = {}

Callers 1

_run_mainMethod · 0.95

Calls 4

NonTranslatedStdoutClass · 0.90
get_credentialsMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected