Using B4G 2.12.6 on Windows 10 with Github and got the following error:
2023-06-01 09:21:57.676 INFO 5260 --- [pool-2-thread-2] c.c.e.i.m.b.j.i.h.OperationScheduler : Refresh scheduled for branch
2023-06-01 09:22:03.604 ERROR 5260 --- [pool-2-thread-4] c.c.e.i.m.b.j.i.r.AbstractJobRunner : Critical error perform the operation.
com.ca.endevor.integration.modules.shared.settings.api.exceptions.InvalidGitTokenException: Git token is incorrect.
at com.ca.endevor.integration.modules.repository.git.impl.helper.JGitCredentialsHelper.checkNotAuthorized(JGitCredentialsHelper.java:36)
What token does this message refer to?
Release : 18.1
B4G 2.12.6
JWT token is generated based on the following setting in application.yml
app:
security
auth:
# Generated token secret key which is 64 bytes long
token-secret: <token_secret>
The GitHub Apps has user-to-server access token expires in 8 hours setting. With this setting, user needs to provide new token-secret in application.yml to generate new access token and restart B4G after 8 hours.
Make the git token permanent by going to the specific Github-app settings in Github, under the "Optional features" menu item make sure that "User-to-server token expiration" displays the "Opt-in" button instead of "Opt-out" .
After the change of the Github-app setting, user can re-login to B4G in order to regenerate the permanent token.
Does this "Git token is incorrect" error have any impact on B4G task ?
Most likely there might be some mappings impacted by the expired token since the changes could not be propagated between git and Endevor.
In order to recover from this there are several steps that can be taken:
1. In case of a mapping is in Initialization failed status - navigate to the specific mapping in "Endevor Inventory" and click on re-run button. This will re initialise the mapping
2. If the mapping is in Revert failed status - navigate to the specific mapping in "Endevor Inventory" and click on "Synchronise now" for each branch that have this error.
3. For the mappings were user don't see any issues in the BFG ui, try push a dummy change to those branches in git in order to trigger any revert in case there are changes that were not propagated between Git repository and Endevor.
4. Last step would be to run global sync back in Settings/Synck-back click on button "Sync back now" but only after user triggered sync/revert for each mapping branch using the dummy commit technique for all mappings. This will take all the changes that were not already propagated from Endevor to git making everything up to date on both sides.
One thing to note, the revert actions will create revert branches in git, therefore after everything is fixed user can merge those missed git changes through pull requests triggering the sync and propagating them to Endevor.