codenamelxl commented on code in PR #51256:
URL: https://github.com/apache/airflow/pull/51256#discussion_r2310685898


##########
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 original one does not work for gitlab. 
   It requires a user_name even for auth_token case. 
   For github, either no user_name or bogus user_name works.
   
   So I was thinking specifying it like this will achieve the most 
compatibility. Please refer to: 
https://github.com/apache/airflow/pull/51256#discussion_r213553640
   



-- 
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]

Reply via email to