简体   繁体   中英

How can send custom error message after git push from local git server by using jgit api

I have been making a local git server by using jgit. Following is my code repository for local git server.

https://github.com/masumcse1/mygitserver

https://github.com/masumcse1/mygitserver/blob/main/src/main/java/org/meveo/api/git/MeveoGitServlet.java

git clone http://localhost:9090/mygitserver/git/customer

This program is working for all type basic git command (clone, push, pull). Now i want to send custom error from this servlet after pushing wrong file (other than.java file) from any user.

User will receive this error message from his git client. any one please explain how can i send this error for git client after push any thing wrong file type.

推送 git 客户端消息成功后

You can do it with a server-side hook

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM