ephraimbuddy commented on code in PR #44976:
URL: https://github.com/apache/airflow/pull/44976#discussion_r1895350145


##########
airflow/dag_processing/bundles/git.py:
##########
@@ -120,9 +154,16 @@ def _has_version(repo: Repo, version: str) -> bool:
         except BadName:
             return False
 
+    def _refresh(self):
+        self.bare_repo.remotes.origin.fetch("+refs/heads/*:refs/heads/*")
+        self.repo.remotes.origin.pull()
+
     def refresh(self) -> None:
         if self.version:
             raise AirflowException("Refreshing a specific version is not 
supported")
 
-        self.bare_repo.remotes.origin.fetch("+refs/heads/*:refs/heads/*")
-        self.repo.remotes.origin.pull()
+        if self.ssh_hook:
+            with self.ssh_hook.get_conn():

Review Comment:
   From what I experimented, once the ssh connection is established, it will be 
used by git to clone the repo. The remote host is where the ssh will establish 
the connection and not the repo url. While testing in breeze, I set localhost 
as the remote host and cloned a private repo. Also, in the breeze ssh config, I 
put it to use private key:
   ```
   Host * 
    IdentityFile ~/.ssh/id_ed25519
   ```
   
   Maybe @potiuk can help here. 



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