![]() I just added it to my regular profile which works for testing, but is probably pretty bad practice for the long term. ssh folder.Ĭopy the contents of this file to the relevant area in the GitLab web interface. Once you’re here, open up the id_rsa.pub file in the. This should be at C:\Windows\System32\config\systemprofile 2. When the SSH key is generated, use the dialog to switch back to the main session.īrowse to the home directory of the local system account. Run Git Bash in the Local System session by running the following: "C:\Program Files\Git\bin\sh" -login -iĪfter that, run ssh-keygen as normal. ![]() No fancy theming and no Desktop, just a single Command Prompt and a matching dialog to get you back to the main session. Click that to switch over to the session with your system command prompt. This will pop up a dialog in the background asking you to “View the message”. I called mine svc, but you can choose anything here: sc create svc binpath="cmd /K start" type=own type=interact & sc start svc & sc delete svc This command creates, launches, and cleans up the service 1. The easiest way to do this in my opinion is to pop open the Start menu, search for cmd, right-click it, and select “Run as Administrator”. Use the prompt to launch a Git shell, generate the SSH key, and copy it to GitLab. The trick was to create a service that’s sole purpose is to spawn a Command Prompt. But how do you do this for the built in account in Windows? I got it to work by mucking around with SC.exe, otherwise known as Service Control. Just run ssh-keygen in Git Bash, copy the public key into the appropriate area in GitLab, and you’re off to the races. This caused the script to barf because internal repos in GitLab require authentication.Īuthorizing a user is usually pretty simple. ![]() One of those scripts checks out a submodule which comes from another GitLab repo, but this one’s permissions are set to internal. I configured the runner to clone a master repo (set up as a public repo in GitLab) and run some build scripts. The runner is pretty easy to set up, a few commands and I had it set up as a service running under Windows built in Local System account - the recommended configuration. I set up a spare Windows 7 box as a GitLab-CI Runner to see if it was any better than an existing Jenkins-based pipeline. I ran into an interesting Windows quirk recently. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |