"Error: Deny by project hooks setting 'default': message of commit" Is Reported When Code Repository Is Pushed from the Local Host to CodeArts Repo
Symptom
If the format of the code file to be pushed to the remote repository is not standard and the ticket number and modifier are not provided, the error information shown in the following figure is displayed.
Analysis
The commit message does not match the regular-expression: ^\[maven-release-plugin\]|[Trouble ticket number or requirement ticket number]\s*.+\W[Modified description]\s*.+\W[Modified reason]\s*.+\W[Modules] \s*.+\W[Modifier]\s*.+\W[Approver]\s*.+
Solution
- To modify the latest incorrect commit message, perform the following operations.
- Perform the following operations to modify the latest incorrect commit message:
Right-click the .git hidden folder and choose Open Git Bash here from the shortcut menu to open Git Bash.
- Run the git log command to find the incorrect commit message.
- Run the git commit --amend -m command to access the vi text editor.
- Run the git commit --amend -m ' command, enter the information in the first line, and press Enter. Enter the information in the second line, and repeat the process to the last line. Add the other single quotation mark at the end of the last line, and press Enter. The modification is successful.
Figure 3 Modifying the commit message
- To modify the incorrect commit message that is not the latest, perform the following operations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot