Basic commands HPC Launch https://hds-sandbox.github. io/HPC-lab/
2025-05-21
Create a new GitHub account if you don’t have one yet. Then, go to repositories and create a new one (e.g. SandboxIntro). Alternatively, you can also fork one of our repositories or if you already have one feel free to use that instead.
Now, we need to create a token classic (for general use). Go to your profile and on the right-side menu select:
Settings > Developer settings (at the bottom) > Personal access tokens > Tokens (classic) > Generate new token (classic)
.
git commit UCloud
Please, remember to save the generated token somewhere locally and safe. You won’t be able to see/copy it again.
Use the token as your password when performing Git operations like push or commit from the HPC.
Then, we will generate SSH key on UCloud following these steps
Terminal
app and mount your personal drivecd /work/myNameXXX/
)ssh
, where you will store your new SSH keysid_repo1
id_repo1.pub
)YOUR-REPO > Settings > Deploy keys > Add deploy key
. The new deploy key can be named as e.g. UCloud-repo1
Finally, to streamline pushing changes…
setup.sh
:setup.sh
Remember to save this file in your personal drive (/work/myNameXXX/
).
You can now git commit and push using the token as password to save all changes to your repository. Let’s give it a try!
Submit a new job on UCloud (e.g. through the Terminal
app). Do not forget to mount your personal drive and use the initialization bash script you just created. Once, the job is running, change directory to your personal drive, and clone your repository.
Now, modify or create a new file in your repository. This is a test to understand how to push changes to GitHub.
You will be asked to enter your GitHub username and the password. When you work from HPCs, you need to enter the token as your password.
Go to GitHub and check if those changes are now visible.