@@ -145,36 +145,30 @@ def _clone_command_for_github_like(git_config, dest_dir):
145145
146146def _clone_command_for_github_like_ssh (git_config , dest_dir ):
147147 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 ." )
149149 _run_clone_command (git_config ["repo" ], dest_dir )
150150
151151
152152def _clone_command_for_github_like_https_2fa_disabled (git_config , dest_dir ):
153153 updated_url = git_config ["repo" ]
154154 if "token" in git_config :
155155 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." )
160157 updated_url = _insert_token_to_repo_url (url = git_config ["repo" ], token = git_config ["token" ])
161158 elif "username" in git_config and "password" in git_config :
162159 updated_url = _insert_username_and_password_to_repo_url (
163160 url = git_config ["repo" ], username = git_config ["username" ], password = git_config ["password" ]
164161 )
165162 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 ." )
167164 _run_clone_command (updated_url , dest_dir )
168165
169166
170167def _clone_command_for_github_like_https_2fa_enabled (git_config , dest_dir ):
171168 updated_url = git_config ["repo" ]
172169 if "token" in git_config :
173170 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." )
178172 updated_url = _insert_token_to_repo_url (url = git_config ["repo" ], token = git_config ["token" ])
179173 _run_clone_command (updated_url , dest_dir )
180174
0 commit comments