Run the command from the commit comments as a YouTrack user with the same e-mail as the commit user. For this feature to work, the user set in the YouTrack configuration should have the "Update project" permission for the projects to run commands in.