Gitlab in S[UW][12] labs |
|
User guideStep 1 - SSH Key PreparationRun the PuTTYgen application from the Windows start menu. Generate a key (the default RSA 2048-bit mode shall be sufficient). Export the generated private key in the OpenSSH format (Conversions -> Export OpenSSH key) into
Copy the public key from the PuTTygen window and register it in the web interface of
Step 2 - Batch File PreparationFor each repository you want to work with, prepare a Windows batch file stored at
Example:
Step 3 - Cloning the repositoryClone the repository by invoking After cloning, open the folder
Further repository operations like pull, commit, push etc. may be performed by the git functions of Visual Studio. Don't forget to commit and push the local repository back to gitlab before leaving. You may also want to erase the local repository if you want to hide your work from other users. If you (or anybody else) did not erase the local repository, you may continue work with the local repository on your next logon. You may want to verify (by checking git status) whether your local repo was not accidentaly or intentionally altered. If you find alterations, rollback the changes and return to the last commit pushed to gitlab. |
|
MotivationAlthough the Windows computers in labs authenticate users by their SIS credentials,
all such authenticated users share the same Windows account Therefore, it is completely unsafe to store any passwords or keys in the default locations defined by Windows. In order to partially mitigate this non-safety, a part of user settings is automatically cleared upon each logon. The use of this part of settings for sensitive information is moderately safe; however, it implies reentering of this information after every logon. Consequently, it is unusable for non-human-readable information like ssh keys. The only storage locations that are safe and persistent are the two personal folders mapped at
However, a local repository can not be stored on Gitlab useAccessing gitlab via HTTP works with usernames and passwords. Windows git clients tend to store the usernames and passwords at least temporarily, which is unsafe in the shared environment of labs. Accessing gitlab via SSH requires a SSH key which must be stored in a persistent personal location,
i.e. at
|
|
Principles of the solutionThe approach tries to avoid any configuration stored at The ssh key is stored at PuTTYgen is used because the command-line The use of The batch does the following:
The local repository shall be commited and pushed into gitlab before logging off from the Windows. The contents of Although the local repository may be modified (including commits) by someone else between the logons by the owner,
the owner is the only user that can push the commits to gitlab because the corresponding ssh key is located at |