On this page
To allow continuous integration, track changes and facilitate automated builds Shaipup uses Google Source Repositories and Git. We utilise your Google account and your registered TerraCipher email to control access to your source code. If you don’t have a Google account this is quick and easy to setup and the following link provides details on how to do this:
Create a Google Account - Google Account Help
You don’t need to have a gmail account and can use the same email you used for your TerraCipher account. Alternatively if you have a Google account or have a gmail account linked to an existing Google account then you will need to make sure the email address you are using to access Shaipup is registered an an alternative email for your Google account. Details on how to set this up can be found here:
Sign in to your Google Account with another email address - Computer - Google Account Help
Once you have these steps completed you are ready to start accessing your source code and can begin to pull it down to your local computer to start developing and testing your code.
Access your Shaip’s repository by clicking the ‘code’ icon on your hosted Shaip
If it’s your first time accessing repositories on Cloud Source Repositories, you will need to login using the email associated with your TerraCipher account
Once logged in, to access the directories and files for your Shaip click Get Started:
In order to modify and deploy changes to your shaip, you will need to install the GCloud CLI and set up SSH-Authentication for your device.
If you are using a Windows device, click here to learn how to install the CLI on a Windows device
In order to install the GCloud CLI, you must have Python3 installed. If running python3 -V
in the terminal doesn’t return a version number, click here to download and install Python3.
Click one of the links to download the correct package version for your device type.
Double click the downloaded file to extract the contents
Open a terminal window from the directory containing the extracted package and type the following commands
Run the install Program to add the CLI to your PATH
./google-cloud-sdk/install.sh
Initialise the GCloud CLI with the following command
./google-cloud-sdk/install.sh
To test that your GCloud is installed and successfully added to path, open your terminal anywhere and type
gcloud --help
and these options will be displayed:
❯ gcloud --help
NAME
gcloud - manage Google Cloud resources and developer workflow
SYNOPSIS
gcloud GROUP | COMMAND [--account=ACCOUNT]
[--billing-project=BILLING_PROJECT] [--configuration=CONFIGURATION]
[--flags-file=YAML_FILE] [--flatten=[KEY,...]] [--format=FORMAT]
...
If you are using a Windows device, click here to learn how to SSH-Authentication on Windows devices
In order to setup SSH-Authentication you must have OpenSSH installed. If running ssh -V
in the terminal doesn’t return a version number, click here to download and install OpenSSH.
Once openSSH is installed, type the following command generate the SSH key, replacing [email protected] with your email:
ssh-keygen -t rsa -C "[email protected]"
Press enter to save it to the default location for SSH keys ~/.ssh
Enter a passcode for accessing the key or continue to press enter to leave it password-less
To copy your key to the clipboard run the following command in your terminal:
cat ~/.ssh/id_rsa.pub | pbcopy
On your repository page, navigate to Manage SSH Keys from the top-right menu
Once on the key manager page, click Register SSH key at the top-right of the page:
Enter a name for your key, and paste the copied key from earlier to the Key field. If done correctly, it should look like this:
From your shaip repository home page, click Clone the top-right of the page
From the menu, click the clipboard icon to copy the cloning command
From your terminal, paste and run the command to clone your repository in the directory you want the repository to be in:
~/Documents
❯ **git clone** ssh://[email protected]@source.developers.google.com:2022/p/tcshaip/r/example-firstshaipShaip
Cloning into 'exampleUser-firstshaipShaip'...
remote: Total 22 (delta 1), reused 22 (delta 1)
Receiving objects: 100% (22/22), 170.81 KiB | 546.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
~/Documents
❯
In a terminal at the root of your repository, type the following command to stage all your repository changes for commit
git add .
To commit your changes with a message, type and run the following command, replacing <COMMIT MESSAGE>
with a description of your changes
git commit -m "<COMMIT MESSAGE>"
To push your commit to the Cloud Source Repository, type the following command in your terminal
git push
If your authentication is setup correctly, the sequence of commands in the terminal should look similar to the following
❯ git add .
❯ git commit -m "first push"
[master 6684552] first push
2 files changed, 7 insertions(+), 6 deletions(-)
❯ git push
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 582 bytes | 582.00 KiB/s, done.
Total 6 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3)
remote: Waiting for private key checker: 1/2 objects left
To ssh://[email protected]:2022/p/tcshaip/r/first_shaip
e144655..6684552 master -> master
After navigating back to your repository page, you will notice a second commit, and your code will updated with the latest changes.