Skip to content
Snippets Groups Projects
Commit 22100ce2 authored by Mohamed AZIKIOU's avatar Mohamed AZIKIOU
Browse files

fix: path to .ssh

parent 9e7593a8
Branches
No related tags found
No related merge requests found
Pipeline #19859 failed
...@@ -20,7 +20,7 @@ RUN sed -e '$s/ash/bash/' /etc/passwd ...@@ -20,7 +20,7 @@ RUN sed -e '$s/ash/bash/' /etc/passwd
COPY start.desktop.sh . COPY start.desktop.sh .
RUN chmod 500 start.desktop.sh RUN chmod 500 start.desktop.sh
RUN mkdir /project && mkdir /tmp/.ssh && mkdir /home/deadlock/mission RUN mkdir /project && mkdir /deadlock/.ssh && mkdir /home/deadlock/mission
RUN chown deadlock:deadlock /home/deadlock RUN chown deadlock:deadlock /home/deadlock
......
...@@ -45,7 +45,7 @@ export default class GitMission { ...@@ -45,7 +45,7 @@ export default class GitMission {
async setupSshAgent() { async setupSshAgent() {
try { try {
const gitea = await ApiService.instance.getGiteaPublicProperties(); const gitea = await ApiService.instance.getGiteaPublicProperties();
await exec(`ssh-add /tmp/.ssh/id_rsa`); await exec(`ssh-add /deadlock/.ssh/id_rsa`);
await exec(`eval "$(ssh-agent -s)" && ssh-keyscan -p ${gitea.sshPort} -H ${gitea.sshHost} >> ~/.ssh/known_hosts`); await exec(`eval "$(ssh-agent -s)" && ssh-keyscan -p ${gitea.sshPort} -H ${gitea.sshHost} >> ~/.ssh/known_hosts`);
} catch (err) { } catch (err) {
this.log(err); this.log(err);
...@@ -62,7 +62,7 @@ export default class GitMission { ...@@ -62,7 +62,7 @@ export default class GitMission {
} }
async forgetSshKeys() { async forgetSshKeys() {
await exec(`ssh-add -d /tmp/.ssh/id_rsa`); await exec(`ssh-add -d /deadlock/.ssh/id_rsa`);
} }
async getAuthor(): Promise<string> { async getAuthor(): Promise<string> {
......
...@@ -108,7 +108,7 @@ export class MissionDevContainer { ...@@ -108,7 +108,7 @@ export class MissionDevContainer {
private async setupMounts() { private async setupMounts() {
this.mounts.splice(0, this.mounts.length); this.mounts.splice(0, this.mounts.length);
this.mounts.push( this.mounts.push(
`source=${userSshKeyFolderPath},target=/tmp/.ssh,type=bind,consistency=cached,readonly`, `source=${userSshKeyFolderPath},target=/deadlock/.ssh,type=bind,consistency=cached,readonly`,
`source=${UserMission.getMissionUserFolder( `source=${UserMission.getMissionUserFolder(
this.missionId, this.missionId,
this.revieweeId, this.revieweeId,
......
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
ON_START_UP_FILE="/deadlock/startup.sh" ON_START_UP_FILE="/deadlock/startup.sh"
TAG="[DEADLOCK]" TAG="[DEADLOCK]"
# setup ssh key for root user
# must be installed by the API first within /tmp/.ssh
mkdir ~/.ssh
cp /tmp/.ssh/* ~/.ssh/
# start init mission script if exists # start init mission script if exists
if [ -f "$ON_START_UP_FILE" ]; then if [ -f "$ON_START_UP_FILE" ]; then
echo echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment