Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem at git #96

Open
ScJn opened this issue Nov 28, 2018 · 6 comments
Open

problem at git #96

ScJn opened this issue Nov 28, 2018 · 6 comments

Comments

@ScJn
Copy link

ScJn commented Nov 28, 2018

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.

@sirikon
Copy link
Contributor

sirikon commented Nov 28, 2018

@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.

@ScJn
Copy link
Author

ScJn commented Nov 28, 2018

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
Copy link
Author

ScJn commented Nov 28, 2018

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

test.bat
image

@sirikon
Copy link
Contributor

sirikon commented Nov 28, 2018

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.

@ScJn
Copy link
Author

ScJn commented Nov 28, 2018

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

@sirikon
Copy link
Contributor

sirikon commented Nov 28, 2018

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

Can't think anything more atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants