Want to automatically reflect Git repository updates to multiple client PCs

Asked 2 years ago, Updated 2 years ago, 147 views

I would like to do an automatic deployment by pushing the Git managed source code update to the repository on the NAS and automatically pushing it to each PC connected to the network. Could you please let me know if there is a way to do that on a Windows 10 PC?
Enter a description of the image here

[Added February 16, 2019] There are the following restrictions and prerequisites:

(1) No direct connection to external networks
External services such as GitHub are not available due to security concerns, and when you push, you need to bring your PC, connect it wired, and push it manually.It is difficult to set up a web server for the same reason.

(2) Local repository is available to users
The software pushed to the local repository is for user use, so it is not possible to instruct each PC to operate Git in detail.

(3) The connection between the main and local repositories can be communicated over the network in the LAN.

git windows-10

2022-09-30 21:38

1 Answers

git-push is not suitable for deployment purposes.I think we should consider another method.

I felt that this question was a XY problem or hammer nail disease.

git-pushI think there is a misunderstanding about the command itself.

git push:

The git push command communicates with other repositories, calculates what is in your local database and not in the destination repository, and then pushes the difference to the destination repository.This command usually authenticates in some way because it requires write access to the destination repository.

  • (Assumed) git-push updates the Git repository on PCs 1, 2, and 3, not the source code (version-managed files checking out to the working directory).
    • Requires git-checkout to update files in the working directory.
  • We need an authentication mechanism for users who did を in the figure to write to PCs 1, 2, and 3.
    • For example, SSH protocol requires an SSH server on PCs 1, 2, and 3.
  • Requires git-checkout to update files in the working directory.
  • For example, SSH protocol requires an SSH server on PCs 1, 2, and 3.

Other things that came to mind:

  • Adding remote repository settings and setting up an authentication server are troublesome as PC4,5,6... and users increase.

If there are no conditions other than those mentioned in the questionnaire, wouldn't it be easy to set up a shared directory on the NAS and mount it on PC1, 2 and 3 respectively?
I think Git hook is available as a way to update files to be placed in the shared directory.


2022-09-30 21:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.