caddy-git icon indicating copy to clipboard operation
caddy-git copied to clipboard

problem at git

Open ScJn opened this issue 7 years ago • 6 comments

after I push new code to my repo, it shows "no new changes" which I think may be a problem. hope you can figure out, thanks.

ScJn avatar Nov 28 '18 10:11 ScJn

@ScJn The maintainer will, probably, need further info about the issue to figure out what's happening.

Version of caddy-git? What's the configuration provided to caddy-git? What's the authentication method of the repo? To what branch did you push?

Detailed info about your issue will ease things up.

sirikon avatar Nov 28 '18 10:11 sirikon

Thanks for your response! here is my caddy.config, and I've already config the webhook in my github's repo 134.175.152.210:8086 { log stdout errors stdout gzip proxy / localhost:8084 { transparent } git { repo https://github.com/ScJn/e_training_system.git hook /webhook i-like branch master path C:\doing\etc\e_training_system then C:\doing\server_jar\test.bat } } caddy.config(should I change the master to origin master?)

here is my test.bat which should execute after pull. cd C:\doing\etc\e_training_system mvn clean package taskkill /F /IM java.exe copy target\e-training-system-0.0.1-SNAPSHOT.jar C:\doing\server_jar /Y echo "build ok" cd C:\doing\server_jar java -jar C:\doing\server_jar\e-training-system-0.0.1-SNAPSHOT.jar pause

the following picture is the console log. After I push to my origin master my server indeed pull it. but it shows "No new changes", there is a change at Role.java clearly.

ScJn avatar Nov 28 '18 11:11 ScJn

the code is hard to read. caddy.config: image

test.bat image

ScJn avatar Nov 28 '18 11:11 ScJn

Actually specifying branch master shouldn't be necesary, as that's the default value. Try removing that line, maybe?

Also @ScJn I wouldn't recommend you to give actual security tokens (the hook secret) and real IP address in the configuration posted here, you can hide them with xxxxxx or something like that. Might be used by someone whilling to break things.

sirikon avatar Nov 28 '18 12:11 sirikon

Thanks for reminding. I removed the branch master but it still don't work. image

ScJn avatar Nov 28 '18 12:11 ScJn

Is the pulled repo on the machine on the correct branch? Might try removing it and re-creating.

Can't think anything more atm.

sirikon avatar Nov 28 '18 15:11 sirikon