Thank you for your continuous support.
I'm a beginner who just started studying servers.
The other day, I had a problem with permission with a group of users, and they helped me, but a similar question occurred separately, so I decided to ask you a question again.
It may be a rudimentary question.I'm sorry.
[Prerequisite]
·To build a Git environment, we created a git user
·Creating a remote repository in /var/lib/git/test.git
"·FTP was done with the ""admin"" account until the Git environment was prepared
[What I want to do]
·I would like to deploy the above remote repository to the public area /var/www/html/test/
·At the same time, I want to be able to FTP to the public area
[Process]
You can push locally to the remote repository and clone from the remote repository to the public area without any problems.
The description in /var/lib/git/test.git/hooks/post-receive is
#!/bin/sh
cd/var/www/html/test
git -- git-dir=.git pull
echo test>/tmp/test.log
So, I put the last echo in for checking operation, but since it is output, I think post-receive is running...
】Question br
Is it difficult to say both FTP and Git deployment?
I've tried various user group settings, chown, chmod, etc., but I'm having a hard time because it doesn't work out the way I want.
FTP was done by adding the git user to the admin user (usermod-aGadmingit), setting the folder in the public area to 775, setting the file to 664 and setting the owner to git:admin, but it doesn't seem to be deployed.
What kind of settings should I set for successful deployment?
I'm really sorry that I didn't understand the authorities properly.
For example, if you look at this Home question, git is supposed to be running readonly when you publish a git repository in ftp.(I can clone, I can't push)
In the first place, OP seemed to have created this question in anticipation of an FTP update to the repository, but it didn't seem to work very well, so it seems to have solved itself.
© 2024 OneMinuteCode. All rights reserved.