codenamelxl commented on code in PR #51256:
URL: https://github.com/apache/airflow/pull/51256#discussion_r2137646020
##########
providers/git/src/airflow/providers/git/hooks/git.py:
##########
@@ -89,7 +90,7 @@ def _process_git_auth_url(self):
if not isinstance(self.repo_url, str):
return
if self.auth_token and self.repo_url.startswith("https://"):
- self.repo_url = self.repo_url.replace("https://",
f"https://{self.auth_token}@")
+ self.repo_url = self.repo_url.replace("https://",
f"https://{self.user_name}:{self.auth_token}@")
Review Comment:
The field is already optional when setting up the connection.
L71 set it to `"user"` should it be empty
For gitlab, the `user_name` doesn't have to be exactly the token name, a
bogus string like `user` is OK too. But without `user_name`, it will fail.
So I was thinking it might be more compatible going this way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]