@@ -145,36 +145,30 @@ def _clone_command_for_github_like(git_config, dest_dir):
145
145
146
146
def _clone_command_for_github_like_ssh (git_config , dest_dir ):
147
147
if "username" in git_config or "password" in git_config or "token" in git_config :
148
- warnings .warn ("Unnecessary credential argument(s) provided ." )
148
+ warnings .warn ("SSH cloning, authentication information in git config will be ignored ." )
149
149
_run_clone_command (git_config ["repo" ], dest_dir )
150
150
151
151
152
152
def _clone_command_for_github_like_https_2fa_disabled (git_config , dest_dir ):
153
153
updated_url = git_config ["repo" ]
154
154
if "token" in git_config :
155
155
if "username" in git_config or "password" in git_config :
156
- warnings .warn (
157
- "Using token for authentication, "
158
- "but unnecessary credential argument(s) provided."
159
- )
156
+ warnings .warn ("Using token for authentication, " "other credentials will be ignored." )
160
157
updated_url = _insert_token_to_repo_url (url = git_config ["repo" ], token = git_config ["token" ])
161
158
elif "username" in git_config and "password" in git_config :
162
159
updated_url = _insert_username_and_password_to_repo_url (
163
160
url = git_config ["repo" ], username = git_config ["username" ], password = git_config ["password" ]
164
161
)
165
162
elif "username" in git_config or "password" in git_config :
166
- warnings .warn ("Unnecessary credential argument(s) provided ." )
163
+ warnings .warn ("Credentials provided in git config will be ignored ." )
167
164
_run_clone_command (updated_url , dest_dir )
168
165
169
166
170
167
def _clone_command_for_github_like_https_2fa_enabled (git_config , dest_dir ):
171
168
updated_url = git_config ["repo" ]
172
169
if "token" in git_config :
173
170
if "username" in git_config or "password" in git_config :
174
- warnings .warn (
175
- "Using token for authentication, "
176
- "but unnecessary credential argument(s) provided."
177
- )
171
+ warnings .warn ("Using token for authentication, " "other credentials will be ignored." )
178
172
updated_url = _insert_token_to_repo_url (url = git_config ["repo" ], token = git_config ["token" ])
179
173
_run_clone_command (updated_url , dest_dir )
180
174
0 commit comments