File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1268,7 +1268,7 @@ pub mod install {
12681268 pub branch : Option < String > ,
12691269 }
12701270
1271- pub const VERUS_REPO : & str = "https://github.com/asterinas/verus.git" ;
1271+ pub const VERUS_REPO : & str = "https://git@ github.com/asterinas/verus.git" ;
12721272
12731273 #[ memoize]
12741274 pub fn tools_dir ( ) -> PathBuf {
@@ -1483,7 +1483,11 @@ pub mod install {
14831483
14841484 // Find the remote and fetch the target branch
14851485 let mut remote = repo. find_remote ( "origin" ) ?;
1486- remote. fetch ( & [ target_branch] , None , None ) ?;
1486+ let mut callbacks = git2:: RemoteCallbacks :: new ( ) ;
1487+ callbacks. credentials ( |_url, username_from_url, _allowed_types| { git2:: Cred :: ssh_key_from_agent ( username_from_url. unwrap_or ( "git" ) ) } ) ;
1488+ let mut fetch_opts = git2:: FetchOptions :: new ( ) ;
1489+ fetch_opts. remote_callbacks ( callbacks) ;
1490+ remote. fetch ( & [ target_branch] , Some ( & mut fetch_opts) , None ) ?;
14871491
14881492 // Get the current branch
14891493 let head = repo. head ( ) ?;
You can’t perform that action at this time.
0 commit comments