I created a project called testproject in gitlab in a private form as an administrator account.
Set up git account on my client pc as follows.
$ git config --global user.name "kimXX"
$ git config --global user.email [email protected]
3. Import and create the storage as follows:
$ git clone http://www.xxx.xxx/root/testproject.git
**Question 1) The storage is created even though the user of the KimXX account is not in the member in the test project?
Shouldn't it be a permission check?**
4. Create a file and reflect it as follows.
$ $ touch README.md
$ git add README.md
$ $ git commit -m "add README"
$ $ git push -u origin master
**Question 2) The file you created can be pushed even though the user of the KimXX account is not in the member
Shouldn't it be a permission check?**
Enter gitlab and check
**Question 3) commit is displayed as an account set up on my client, but push is indicated as an admin account, shouldn't push also be displayed as an account set up on the client?
Before we begin, we will explain the commands below.
git config --global user.name "kimXX"
git config --global user.email [email protected]
This is a setting for specifying the author of the commit, and is not related to the account for access to the git repository.
Looking at your question, you are already logged in with Administrator
.
If you do not want to retain your login, you must enter the following command:
git config --global --unset credential.helper
Question 1) In the test project, the user of the KimXX account is not in the member, but the storage is created? Shouldn't it be a permission check?
Because the repository was created as private, login to access the repository is also required when clone
.
You cannot do clone
for an account that is not authorized even after logging in.
Question 2) In the test project, the user of the KimXX account is not in the member, but the file you created can be pushed, so shouldn't it be checked for permission?
Check permissions. If you do not have permission, push
Question 3) Commit is displayed as an account set up on my client, but push is shown as an admin account, shouldn't push also be displayed as an account set up on the client?
push
is the account of the repository, and the author of the commit is set to user.name
.
If you look at the image you uploaded, you can see that push
is Administrator
, but the author of the commit is not Administrator
.
Thank you very much. It was very helpful.
© 2024 OneMinuteCode. All rights reserved.