Skip to content

Commit c537046

Browse files
update
1 parent 6ae9e2e commit c537046

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

web/app/Models/GitRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ private function _getSSHKey($gitSshKeyId, $findHostingSubscription)
8686
shell_exec('mkdir -p ' . $sshPath);
8787
}
8888

89-
shell_exec('chown '.$findHostingSubscription->system_username.':'.$findHostingSubscription->system_username.' -R ' . dirname($sshPath));
90-
shell_exec('chmod 0700 ' . dirname($sshPath));
89+
shell_exec('chown '.$findHostingSubscription->system_username.':'.$findHostingSubscription->system_username.' -R ' . $sshPath);
90+
shell_exec('chmod 0700 ' . $sshPath);
9191

9292
if (!file_exists($privateKeyFile)) {
9393
file_put_contents($privateKeyFile, $gitSSHKey->private_key);
@@ -156,7 +156,7 @@ public function pull()
156156
shell_exec('mkdir -p ' . dirname($shellFile));
157157
shell_exec('chown '.$findHostingSubscription->system_username.':'.$findHostingSubscription->system_username.' -R ' . dirname(dirname($shellFile)));
158158

159-
$shellContent = view('actions.git.pull-repo', [
159+
$shellContent = view('actions.git.pull-repo-user', [
160160
'gitProvider' => $gitSSHUrl['provider'],
161161
'systemUsername' => $findHostingSubscription->system_username,
162162
'gitRepositoryId' => $this->id,

web/resources/views/actions/git/pull-repo-user.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
cd {{$projectDir}}
44

5+
git reset --hard
6+
57
@if($privateKeyFile)
68

79
ssh-keyscan {{$gitProvider}} >> /home/{{$systemUsername}}/.ssh/known_hosts
@@ -17,5 +19,3 @@
1719
@endif
1820

1921
rm -rf {{$selfFile}}
20-
21-
curl

0 commit comments

Comments
 (0)