remote: Write access to repository not granted. #46398
-
Select Topic AreaProduct Feedback Bodyhi there, i am getting a terminal error saying:
If I am the owner of the repo, why do I not have write access? I created a fine-grained token for this repo but still, nothing. suggestions from those who solved ran into and solved this before? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 11 replies
-
Is that the actual error returned or did you edit it slightly to remove info? In either case it's likely trying to write to the repository either as a different configured user or no configured user at all. Try running Also, was this the process you took when cloning to use the token? GitHub Docs: Using a token on the command line |
Beta Was this translation helpful? Give feedback.
-
@chris-c-thomas yep, edited url. but doubled checked url is the exact match to just ran but unfortunately, no. i'm not even getting to the point where i can enter my user and pass (token). this err is happening before. i am getting this err as soon as i enter |
Beta Was this translation helpful? Give feedback.
-
Right, you won't be able to push anything until things are configured to use your token instead of your old password which is likely what's happening. That's why I had asked if when you originally cloned the repository you entered your token like this here? You can update your cached credentials to your token by following this doc. There's a link in there about changing to the Git Credential Manager if you prefer something like that. You can use the GitHub CLI as well. Running Give these approaches a shot and let me know how it goes. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, I have the same problem but in a different context. suggestions from those who solved ran into and solved this before? thanks |
Beta Was this translation helpful? Give feedback.
-
Finally using the Credential Manager Git Credential Manager worked for me.. |
Beta Was this translation helpful? Give feedback.
-
I 'm not a vim or bash savvy developer more especially because I am new to programming. I have a work git account which is associated with my work aws account. With this account, I can push and pull from my work repository. Now I also have a personal git account which I use for personal development. Over the last 1 years or more I haven't used my personal git account but my work account. Recently I decided to fork a private repo with my personal account and got 403 error. I knew instantly that the problem is due to "multiple hit account on same machine". I have applied all the steps in the Git Credential Manager , with this I was able to fork this private repo with my personal account and then I couldn't pull or push to my work git repo any more, I had to revert all the changes. My question is how do I switch between different git account without going through the complicated SSH guides which I have been seeing around. I have tried the Git Credential Manger as stated above , I have also tried setting up my intelliji IDE but with this I can only use one account per time and can't switch |
Beta Was this translation helpful? Give feedback.
-
This happened because credentials have changed in remote but not updated in your local git credential store. So you may use Git Credential Manager (GCM) to setup so that new credentials from remote will be synced with your local credentials. Basically there you will follow these two main steps:
|
Beta Was this translation helpful? Give feedback.
-
the reason is sample try to logout using this command $ gh auth logout and go back to GitHub create a new token do forget to give the token the permission when generate, select all the permissions you want the token to have before generating , the go back and to the command line and login in using $gh auth login |
Beta Was this translation helpful? Give feedback.
-
git remote add origin https://github.com/Duhduh420/Duhduh420.git |
Beta Was this translation helpful? Give feedback.
-
The new key generated here (https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#using-a-personal-access-token-on-the-command-line) must have "writing" permissions. Be sure to click on those options when create the new key. That's how it works for me |
Beta Was this translation helpful? Give feedback.
-
If you landed here because of I don't know if some change propagated from GitHub or organizational level and I just missed the news, but today my GitHub Actions workflow was failing with the above error. My workflow pushes tags back to the repo through our own GitHub App. I reinstalled the app to the organization and to my repository and triple checked my App permissions. Unless I missed some new permission, everything was set as it was days ago. HOWEVER... reading through the raw GitHub workflow logs drew a different picture: Working 2 days ago:
Error today:
It seems GitHub (or my organization) is preventing GitHub App permissions from casting its wide permission net implicitly to my workflow. After adding back the missing permissions from 2 days ago into my workflow yaml, it started working again. Edit: Leaving this up since it may still be helpful, but I just learned that our org upgraded to GitHub Enterprise which I guess affected workflows. |
Beta Was this translation helpful? Give feedback.
-
Lol
…On Fri, Oct 20, 2023, 6:33 PM Kerry Johnson ***@***.***> wrote:
If you landed here because of fatal: unable to access 'https://github.com/
<your-company>/<your-repo>.git/' or similar issue in GitHub Actions
suddenly, I found that I had to explicitly state the permissions in the
yaml workflow file now as described above.
I don't know if some change propagated from GitHub or organizational level
and I just missed the news, but today my GitHub Actions workflow was
failing with the above error. My workflow pushes tags back to the repo
through our own GitHub App. I reinstalled the app to the organization and
to my repository and triple checked my App permissions. Unless I missed
some new permission, everything was set as it was days ago.
HOWEVER... reading through the raw GitHub workflow logs drew a different
picture:
Working 2 days ago:
2023-10-18T22:05:43.0996961Z ##[group]GITHUB_TOKEN Permissions
2023-10-18T22:05:43.0999064Z Actions: write
2023-10-18T22:05:43.0999735Z Checks: write
2023-10-18T22:05:43.1000452Z Contents: write
2023-10-18T22:05:43.1001194Z Deployments: write
2023-10-18T22:05:43.1001714Z Discussions: write
2023-10-18T22:05:43.1002296Z Issues: write
2023-10-18T22:05:43.1002855Z Metadata: read
2023-10-18T22:05:43.1003338Z Packages: write
2023-10-18T22:05:43.1003919Z Pages: write
2023-10-18T22:05:43.1004406Z PullRequests: write
2023-10-18T22:05:43.1004999Z RepositoryProjects: write
2023-10-18T22:05:43.1005892Z SecurityEvents: write
2023-10-18T22:05:43.1006436Z Statuses: write
2023-10-18T22:05:43.1006972Z ##[endgroup]
Error today:
2023-10-20T21:00:35.4030454Z ##[group]GITHUB_TOKEN Permissions
2023-10-20T21:00:35.4032814Z Contents: read
2023-10-20T21:00:35.4033545Z Metadata: read
2023-10-20T21:00:35.4034285Z Packages: read
2023-10-20T21:00:35.4034945Z ##[endgroup]
It seems GitHub (or my organization) is preventing GitHub App permissions
from casting its wide permission net implicitly to my workflow. After
adding back the missing permissions from 2 days ago into my workflow yaml,
it started working again.
—
Reply to this email directly, view it on GitHub
<#46398 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBHJCHNKAN5K2DZG63KVFBLYAL35BAVCNFSM6AAAAAAURRSNFOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGNBTG4YDQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
not get any results guys any other way? |
Beta Was this translation helpful? Give feedback.
-
It seems like you're encountering a 403 error, indicating that there's an issue with write access to your GitHub repository. This could be related to your authentication token or repository settings. Let's troubleshoot this:
|
Beta Was this translation helpful? Give feedback.
Right, you won't be able to push anything until things are configured to use your token instead of your old password which is likely what's happening. That's why I had asked if when you originally cloned the repository you entered your token like this here?
You can update your cached credentials to your token by following this doc. There's a link in there about changing to the Git Credential Manager if you prefer something like that.
You can use the GitHub CLI as well. Running
gh auth login
will let you setup your credentials using your token instead of your old password.Give these approaches a shot and let me know how it goes.