Skip to content

Commit 5c41628

Browse files
committedSep 28, 2017
解决svn observe repo的下载tar.gz的问题
1 parent b936e6b commit 5c41628

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎src/applications/diffusion/controller/DiffusionDownloadController.php

+13
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,19 @@ public function handleRequest(AphrontRequest $request) {
125125
if(!$this->endsWith($localPath, "/")){
126126
$localPath = $localPath."/";
127127
}
128+
129+
$credential_phid = $repo->getCredentialPHID();
130+
131+
if (/*$is_http && !$is_svn &&*/ $credential_phid) {
132+
$key = PassphrasePasswordKey::loadFromPHID(
133+
$credential_phid,
134+
PhabricatorUser::getOmnipotentUser());
135+
136+
$user = $key->getUsernameEnvelope()->openEnvelope();
137+
$pass = $key->getPasswordEnvelope()->openEnvelope();
138+
$localPath = "--no-auth-cache --username ".rawurlencode($user).' --password '.rawurlencode($pass)." $localPath";
139+
}
140+
128141
}
129142
}
130143
}

0 commit comments

Comments
 (0)
Failed to load comments.