Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara-scripts
Commits
2f48438e
Commit
2f48438e
authored
Aug 11, 2015
by
Aaron Wells
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a script to help with VM customization
parent
21962055
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
vm/gitsetup.sh
vm/gitsetup.sh
+43
-0
No files found.
vm/gitsetup.sh
0 → 100755
View file @
2f48438e
#!/bin/bash
# This is a shell script to assist non-technical users in customizing the git environment
# in a VM that already has Mahara installed.
localuser
=
qa
homedir
=
/home/
$localuser
sshdir
=
$homedir
/.ssh
desktopdir
=
$homedir
/Desktop
wwwroot
=
/var/www/html/mahara
echo
"Please enter your name (e.g.
\"
Mike O'Connor
\"
): "
read
name
echo
"Please enter your email address: "
read
email
echo
""
echo
"Setting up
\"
${
name
}
<
${
email
}
>
\.
.."
echo
""
cd
$wwwroot
git config
--global
user.name
$name
git config
--global
user.email
$email
mkdir
$sshdir
>>
/dev/null 2>&1
mkdir
$desktopdir
>>
/dev/null 2>&1
chmod
700
$sshdir
if
[
!
-f
$sshdir
/id_rsa.pub
]
;
then
ssh-keygen
-t
rsa
-b
4096
-C
$email
-f
$sshdir
/id_rsa
-N
""
fi
cp
$sshdir
/id_rsa.pub
$desktopdir
/id_rsa.pub.txt
echo
""
echo
"Almost done! Now you need to enter your public SSH key into your Gerrit account."
echo
""
echo
"1. Open up the text file
\"
id_rsa.pub.txt
\"
on your VM's desktop."
echo
"2. Copy its contents to the clipboard."
echo
"3. Go to https://reviews.mahara.org/#/settings/ssh-keys"
echo
"4. Click the
\"
Add Key ...
\"
button."
echo
"5. Paste the contents of
\"
id_rsa.pub.txt
\"
into the text field."
echo
"6. Click the
\"
Add
\"
button."
echo
""
echo
"Then you should be able to push patches to Mahara's Gerrit, using
\"
make push
\"
!"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment