@@ -74,11 +74,10 @@ def backup(user, password, access_token, organizations, dest):
7474
7575 for repository in chain (* repositories ):
7676 logger .info ("Github API rate limit: {}" .format (github_instance .get_rate_limit ()))
77- if password is not None and repository .private is True :
77+ if access_token is not None and repository .private is True :
7878 source = repository .clone_url .replace (
79- "https://" ,
80- "https://{}:{}@" .format (user , password )
81- )
79+ "https://" , "https://{}:{}@" .format (user , access_token )
80+ )
8281 else :
8382 source = repository .clone_url
8483
@@ -100,7 +99,7 @@ def backup(user, password, access_token, organizations, dest):
10099 logger .error ("There was an error fetching the branches "
101100 "from the repository {}, "
102101 "skipping it" .format (repository .name ))
103- pass
102+ continue
104103 logger .info ("Finished copying repo {}" .format (repository .name ))
105104 # Otherwise clone the repository and fetch all branches
106105 else :
@@ -115,7 +114,7 @@ def backup(user, password, access_token, organizations, dest):
115114 logger .error ("ERROR: Error cloning repository {}, "
116115 "skipping it" .format (repository .name ))
117116 logger .error (str (e ))
118- pass
117+ continue
119118 try :
120119 with cd (repository_path ):
121120 check_call (track_all_branches , shell = True ,
@@ -129,7 +128,6 @@ def backup(user, password, access_token, organizations, dest):
129128 repository .name
130129 ))
131130 logger .error (str (e ))
132- pass
133131
134132
135133def compress_and_move (source , final_dest ):
0 commit comments