I'm trying to find remote GIT repository permission without any file changes. I have tried below command,
"git push --dry-run"
its shows, everything-up-to-date.
The problem is I have cloned my remote repository after that I removed all my permission in remote git repository I want to know the remote repository permission before any local changes I made.
Open Security for a repository Open the web portal and choose the project where you want to add users or groups. To choose another project, see Switch project, repository, team. Open Project settings>Repositories. To set the permissions for all Git repositories, choose Security.
A very easy way to check is whether you see an edit 'pencil' icon in the top right of the README.MD on the main Code page of the repo (scroll down to it if there's a long list of top level files/folders). Do this when you are logged in to Github, obviously.
Find what file changed in a commit To find out which files changed in a given commit, use the git log --raw command.
The git status command displays the state of the working directory and the staging area.
You can at least check if the remote repo is still remotely readable with git ls-remote
From any folder in your local machine, type git ls-remote /url/remote/repo
.
But for any more advance permission check, you would need to go to the remote server hosting that repo.
Or at list query that server, listing the members for a given project.
See GitLab API "List all members of a group or project".
Each member has access_level which will give a fined-grained permission.
10 => Guest access
20 => Reporter access
30 => Developer access
40 => Maintainer access
50 => Owner access # Only valid for groups
Note that GitLab 15.1 (June 2022) adds:
API includes additional detail about who added members
The members API now returns more information about who added a user to a project or group in the new
created_by
field.Thank you Rémy Jacquin for your contribution!
See Documentation and Issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With