Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job failing ; exception error #41

Closed
tobystic opened this issue Jan 8, 2024 · 1 comment
Closed

Job failing ; exception error #41

tobystic opened this issue Jan 8, 2024 · 1 comment

Comments

@tobystic
Copy link

tobystic commented Jan 8, 2024

Hello,

I have been using this workflow for about 2 years with no issues but the jobs suddenly stopped running in November'23. When I look at the error returned in the job, I see "Resource protected by organization SAML enforcement".

What I have done so far:

  1. I ensured the PAT was not expired and even generated a new one with extended validity date.
  2. I followed the steps in issue 2661 and Github docs to ensure write access by re-authorizing access. This error no longer occurs but the job still fails and now the error below is the current error: "{"message": "Must have push access to repository", "documentation_url": "https://docs.github.com/rest/metrics/traffic#get-page-views"}`

 
Traceback (most recent call last): File "/main.py", line 57, in <module> main() File "/main.py", line 25, in main views_frame = repo_stats.get_views(views_path) File "/repostats.py", line 9, in get_views views = self.repo.get_views_traffic() File "/root/-x-v5uFv0/lib/python3.8/site-packages/github/Repository.py", line [19](https://github.com/Azure/Azure-Network-Security/actions/runs/7398228726/job/20126949735#step:4:20)86, in get_views_traffic headers, data = self._requester.requestJsonAndCheck( File "/root/-x-v5uFv0/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck return self.__check( File "/root/-x-v5uFv0/lib/python3.8/site-packages/github/Requester.py", line 378, in __check raise self.__createException(status, responseHeaders, output) github.GithubException.GithubException: 403 **{"message": "Must have push access to repository", "documentation_url": "https://docs.github.com/rest/metrics/traffic#get-page-views"}**

@sangonzal
Copy link
Owner

Hi @tobystic, given that nothing has changed in the extension and that it suddenly stopped working, I suspect that that maybe it was change in the repositories/organizations access policies. Do you have push permissions to the repository? Does the PAT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants