nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

💡A-CI Error: Unable to push workflow #264

Open ghos7ie opened 1 month ago

ghos7ie commented 1 month ago

Hi, just wanted to share for those facing this issue when attempting A-CI increment.

image

I solved this issue by following this StackOverflow post.

TLDR:

  1. Creating a Personal Access Token in my Github account.

    Must store the PAT string somewhere as it will not be shown again once you leave the page.

  2. Enable both repo and workflows in the PAT.
  3. Removing all Github credentials (follow steps below the answer).
  4. Login to SourceTree with PAT.
  5. Push commit again.

Additionally, if you receive errors in your CI pipeline, you can check what went wrong under the Actions tab of your repo.

I had issues with CheckStyle and my JUnit tests, which caused my CI to fail.

blackpanther9229 commented 1 month ago

By the way, this is more detail of how to do it with SourceTree:

  1. Create (if you haven't had one) Personal Access Token that allows workflow in github.
  2. Navigate to Repository -> Repository Settings and change the URL of origin from https://github.com/<your_git_hubname>/ip.git to https://<The_Personal_Access_Token_key>@github.com/<your_github_name>/ip.git You can see The_Personal_Access_Token_key after create the token.
EdaYeo commented 1 month ago

To add on for those not using SourceTree, I solved it on Windows 11 / IntelliJ by:

  1. Creating a PAT that allows workflow in github
  2. Going to IntelliJ > Settings > Version Control > Github > Sign in by token and adding the PAT
  3. Going to Start > Settings > Windows Credentials manager and deleting my old git credentials