Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to clone with a PAT as a read-only action

See original GitHub issue

I’m struggling to understand how I could simply clone repositories in an action, without using deploy keys because they have to be added in each repository to work. PAT permissions are really not user-friendly, and I’d just like to have a simple read:repository permission to have the right to clone a repository’s code. I’m hitting the bug for cloning with a token defined: remote: Write access to repository not granted. but I don’t care about write access to that repository, with my PAT. Is this something possible with a PAT that can only clone and not push ?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:10
  • Comments:12

github_iconTop GitHub Comments

twistedpaircommented, Nov 2, 2022

+1 on @NorseGaud 's situation.

I cannot get a checkout of a private repo as a submodule using FG PATs. Works fine with classic PATs and “Repo” permission.

I wonder if this could have to do with the additional Organization settings recently added to allow/block/require approval for FG PATs in organizations? I set FG PATs to be allowed in my org, but I still get these "remote: Write access to repository not granted. " errors when trying to do read operations with this action.

twistedpaircommented, Oct 27, 2022

@mifi , is that content: read and metadata: read?

I’m seeing the same problem with fine grained PATs and @actions/checkout@v3

When I use a FG PAT with content: read and metadata: read, and give the PAT’s user read access to the given repo, I still see the remote: Write access to repository not granted. error in GitHub Actions.

Why do we need write access to do a read operation?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To: Clone GIT Repo Using Personal Access Token
3. Click 'Generate New Token' to create a new token. Name the token appropriately so you can identify it later on (if needed)...
Read more >
Solved: Can a person with Read only access to private repo...
Yes, a user will be able to ''clone'' the repository and thus download a repository to his/her local machine and read the files....
Read more >
Partial clone - GitLab Docs
Using partial clone with a file size filter solves this problem, by excluding troublesome large files from clones and fetches. When Git encounters...
Read more >
How to copy a read-only file? - Stack Overflow
You have diagnosed this incorrectly. File copying will never fail because the source is read only. File copying will fail if the existing ......
Read more >
Set Git repository permissions - Azure Repos - Microsoft Learn
Permission · Read (clone, fetch, and explore the contents of a repository); also, can create, comment on, vote, and Contribute to pull requests....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found