Module Git - Easy integration of git for your development

When using git module with a locally configured remote on windows.
Commit is OK, but push says "Git User not configured"

When pushing from command-line :

git push --set-upstream test master
Enumerating objects: 25, done.
Counting objects: 100% (25/25), done.
Delta compression using up to 4 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 8.37 KiB | 100.00 KiB/s, done.
Total 14 (delta 7), reused 0 (delta 0), pack-reused 0
To C:/Users/a2i/Documents/testJFO
f70e910..8883e20 master -> master
error: could not lock config file .git/config: Permission denied
error: unable to write upstream branch configuration

The push is done, but do I have to change ~/.gitconfig to be able to use the push button in Designer ?

It looks like you need to configure your identity in Git. Open a terminal and run this command for your user account. Below is an example script.

$ git config --global "John Doe"
$ git config --global

This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating. I have ran into this before on a new system when I forget to configure my identity in Git. :wink:

1 Like

Using your GitHub PAT instead your password seems to fix this issue

1 Like

Should be possible to resolve this issue temporarily by committing and pushing using cmd.

1 Like

@e.sagnelonge if i pull from the remote repo onto a new host how are the changes implemented in the project?

I am seeing that there is a delay in the gateway being updated with the changes

The default scan interval for such changes is five minutes. That can be configured (I don't have it handy), or in later Ignition versions, can be triggered by a system call.

Thank you! When pulling from git into the project repo how have you avoided manually git forcing a merge?

I am not sure I understand the question.
My understanding of the terminology is:
git is the technology for distributed version control.
A repo is a single unit of controlled artifacts (a folder and all of the code under it, except what is excluded by .gitignore).
There is a repo in your Ignition/data/projects/<projectName> folder. It is hidden and is called .git.
Most likely there is another copy of the repo somewhere else. gitHub, gitLabs, DevOps, gitea are all examples. By convention, this repo is called remote/origin and is (by convention) the single source of truth.
There are other copies of the repo in the distributed environment. Likely one on every development machine. Those would be remote/<something>.
You would pull a repo from any remote machine. For your sanity you would agree that you would only pull from remote/origin. You could push a repo to any machine. Again, for the sanity of everyone involved you would only push to remote/origin.

There are multiple branches in a repo. By convention, the source of truth for production deployment is main or master. Development and experiments are done on other branches.

If you pull from a remote machine, git will require a merge only if there are changes to the local repo and the remote repo on the checked out branch.

Given this understanding, avoiding a merge involves using branches.

When are you seeing git force a merge?

1 Like

I instantiate a new project in the gateway. I then connect them associate that project with a remote repo in Github using git module on a local machine. I open that project in the designer and pull from remote-origin . The pull occurs successfully but gets stuck in a merging state and therefore does not update the project. So i use git commands in terminal to force the pull and update the local machine's repo.

I need to add I am not using docker at all for project deployment. I am trying to leverage git across a corporate ecosystem of ignition instances so I can meet 21 CFR requirements in a more automated fashion.

I think I remember cloning the repo locally the first time rather than pulling.