Overview
There is now a Git repository on Technology Nursery for use by TSSG members. The git server was created using Carlos Bernárdez's git-server-docker image. To access the repository, send me your SSH public key by attaching it to an email.
Instructions on locating or creating your SSH public key can be found in Connecting to GitHub with SSH.
Step-by-step guides
Prerequisites
- Send ssh public key to ralph@navarrocomputing.com
Ralph A. Navarro Jr. will let you know when your ssh key has been posted to the git server.
Verify access to git server
ssh git@technologynursery.org -p 2222
... Welcome to git-server-docker! You've successfully authenticated, but I do not provide interactive shell access. ...
Refreshing your ssh cached entry for our git server
Our git-server had been upgraded back on 2018-12-05. This caused a change in the server's private key. If you haven't connected to the server since then, your ssh will complain about the server's identity not matching that in the known_hosts file.
- Clear out your known_hosts file of the invalid server certificate entries:
ssh-keygen -R technologynursery.org
ssh-keygen -R [technologynursery.org]:2222
- Follow the steps within Verify access to git server.
How to create a new repository
cd myrepo
git init --shared=true
git add .
git commit -m "my first commit"
cd ..
git clone --bare myrepo myrepo.git
List available repositories
Must have a user account on server s14.
- ssh s14 "ls /home/ralph/Projects/git-server/repos/"
- jenkinsJobs.git
- LeaseLine.git
- tssgTechBackup.git
- tssgTech.git
- tssgTechOriginal.git
- tssgTechPoc.git
- tssgWebflow.git
How to upload (publish) a repository
Must have a user account on server s14.
scp -r myrepo.git <user>@technologynursery.org:/home/ralph/Projects/git-server/repos
How to clone a repository to your local machine
Prerequisites
- Your SSH public key must have been posted to Git Server
Add this to ~/.ssh/config
~/.ssh/configHost g14 tssg Hostname technologynursery.org Port 2222 User git
Clone Examples
Execute these in the directory in which you wish to base your local repository (example: ~/Projects)
- git clone ssh://git@technologynursery.org:2222/git-server/repos/tssgTech.git
or
git clone ssh://tssg/git-server/repos/tssgTech.git
or
git clone ssh://g14/git-server/repos/tssgTech.git
Currently Available Git Repositories
On 2020-05-19, these are the available repositories on our remote, private, git server:
LeaseLine.git: Ralph A. Navarro Jr. mobile application to assist drawing the line on automobile lease costs.
tssgTech.git: Web Project's tssg.tech web site.
- tssgTechBackup.git:
- tssgTechOriginal.git:
- tssgTechPoc.git:
- tssgWebflow.git:
- jenkinsJobs: Backups of changed Jenkins Jobs are committed every week on Wednesday at about 01:35 AM
Related articles
There is no content with the specified labels
3 Comments
Joel Sharasheff
Joel Sharasheff 7/2/2018 5:19pm
These are the steps I took to update and/or add files to the common Web development repository.
I installed command line and GUI apps to run git for windows 64 bit from mingw.org.
ssh git@technologynursery.org -p 2222
git log
git status
git add schedule.php
git commit -m "holds the initial format for schedule display"
git push
To verify that all changes were committed and shared correctly, you can grab a full copy of the latest data.
There are probably ways to simplify your git commands and get the work done quicker, but these will get you started.
Ralph A. Navarro Jr.
Connecting to the TSSG git server will just verify that you can connect. It is only needed when you want to verify that your public key is on the server so that you can be authenticated to access the source files. You do not need to run ssh every time you do a git clone, or git pull, or git push.
You cannot run a git log or git status unless you have already cloned the repository to a local directory and have changed directory (cd) to the local location of the source files (as Wayne Garmil points out below).
How about this for a better workflow:
Starting Out
Development Workflow
Repeat the following workflow whenever you want to commit changes. This is one way to minimize having to do address merging changes which could slow you down.
Pull the latest updates locally
Do this every time before you start to change any files.
Make changes to files in your local repository and commit them.
Push your local changes to the remote repository
Wayne Garmil
Joel's comment above using the git clone command is good of you have not yet created a local copy of the repository.
If you have previously done the git clone command, and just need to get the updated file(s), then do the following commands:
This will download all the changes from the git server into your local repository.
It is strongly recommended that, before starting to make changes to files in your local repository, you run the git pull command. This will ensure that your local repository is up to date, and help avoid conflicts when you go to push your changes later on.