@@ -74,11 +74,10 @@ def backup(user, password, access_token, organizations, dest):
74
74
75
75
for repository in chain (* repositories ):
76
76
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 :
78
78
source = repository .clone_url .replace (
79
- "https://" ,
80
- "https://{}:{}@" .format (user , password )
81
- )
79
+ "https://" , "https://{}:{}@" .format (user , access_token )
80
+ )
82
81
else :
83
82
source = repository .clone_url
84
83
@@ -100,7 +99,7 @@ def backup(user, password, access_token, organizations, dest):
100
99
logger .error ("There was an error fetching the branches "
101
100
"from the repository {}, "
102
101
"skipping it" .format (repository .name ))
103
- pass
102
+ continue
104
103
logger .info ("Finished copying repo {}" .format (repository .name ))
105
104
# Otherwise clone the repository and fetch all branches
106
105
else :
@@ -115,7 +114,7 @@ def backup(user, password, access_token, organizations, dest):
115
114
logger .error ("ERROR: Error cloning repository {}, "
116
115
"skipping it" .format (repository .name ))
117
116
logger .error (str (e ))
118
- pass
117
+ continue
119
118
try :
120
119
with cd (repository_path ):
121
120
check_call (track_all_branches , shell = True ,
@@ -129,7 +128,6 @@ def backup(user, password, access_token, organizations, dest):
129
128
repository .name
130
129
))
131
130
logger .error (str (e ))
132
- pass
133
131
134
132
135
133
def compress_and_move (source , final_dest ):
0 commit comments