Connect the GitHub Repository to the Development Machine

1.  Set up GitHub SSH security, if not already done. Especially check if you already have an SSH key on your machine, and use that in GitHub settings as described here in this URL. These instructions show you how to check for existing keys too.

N.B. An SSH key with a passphrase is not supported. When prompted to enter a passphrase during the SSH key creation, just press Enter.

     See this link for detailed instructions:
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

2.  Initialize the new repository using these steps at an administrative command prompt. For example, if you have Visual LANSA installed into c:\program files(x86)\lansa and the address of the remote git repo is git@github.com:lansa/syd-lansa5-dem.git

$ cd c:\program files(x86)\lansa

$ dir .gitignore

$ git init

$ git remote add origin git@github.com:lansa/syd-lansa5-dem.git

$ git add -A

$ git commit -m "Setup initial environment"

$ git push --force --set-upstream origin master

 

The bold text dir .gitignore must show that the file exists. If it says "File Not Found", do not continue. It is vital that you use the .gitignore file that LANSA ships otherwise the deployment will not work correctly.

If the push fails with "ERROR: Repository not found" then you need to add your SSH key to GitHub as a Collaborator (if you are not the owner of the GitHub account). See Settings\Collaborators in GitHub

Or, you have used the incorrect github repository address. Type git remote -vv and check that the entire URL matches the repository, including the github user name (which is 'lansa' in this example)

3.  Run Git Extensions to check that the git repository has the approximately correct structure. View the latest commit and click on the File Tree tab. Only the files and directories listed in the following graphic should be present. If not, contact LANSA support:

4.  Check that the GitHub repo also has the same structure: