In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to use AWS's code management tool codecommit, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
AWS codecommit is a version control service hosted by AWS that stores and manages assets privately in the cloud.
CodeCommit is a secure, highly scalable, managed source control service that can be used to host private Git repositories that support the standard features of Git.
It is recommended to create a new user for codecommit and only give this user the relevant permissions of codecommit (see below):
1) to allow users to use the CodeCommit console, the administrator must grant them permission to perform CodeCommit operations. For example, you can attach an AWSCodeCommitPowerUser managed policy or its equivalent policy to a user or group
2) AWSCodeCommitFullAccess-Grant full access to CodeCommit. Apply this policy only to administrative users to whom you want to grant full control over the CodeCommit repository and related resources in your AWS account, including the ability to delete the repository
3) AWSCodeCommitPowerUser-allows users to access all functions of CodeCommit and repository-related resources, but does not allow deletion of CodeCommit repositories or creation or deletion of repository-related resources in other AWS services such as Amazon CloudWatch Events
4) AWSCodeCommitReadOnly-the ability to grant read-only access to repository-related resources in CodeCommit and other AWS services, as well as the ability to create and manage your own CodeCommit-related resources, such as Git credentials and SSH keys for their IAM users to use when accessing the repository. For users who want to grant them the ability to read the contents of the repository but cannot make any changes to the content
Allow users to use Git for a single repository
In CodeCommit, GitPull IAM policy permissions apply to any Git client command that retrieves data from CodeCommit, including git fetch, git clone, and so on. Similarly, GitPush IAM policy permissions apply to any Git client command that sends data to CodeCommit. For example, if the GitPush IAM policy permission is set to Allow, the user can use the Git protocol to push branch deletion. Any permissions applied to the DeleteBranch operation of this IAM user do not affect the push. DeleteBranch permissions apply to operations performed through the console, AWS CLI, software development kits, and API, but not to operations performed through the Git protocol.
The following example allows specified users to perform fetch and push operations on the CodeCommit repository named MyDemoRepo:
{
"Version": "2012-10-17"
"Statement": [
{
"Effect": "Allow"
"Action": [
"codecommit:GitPull"
"codecommit:GitPush"
]
"Resource": "arn:aws:codecommit:us-east-2:111111111111:MyDemoRepo"
}
]
}
Configure the private key pulled by git offline:
Step 1: prerequisites
You must connect to the AWS CodeCommit repository using a Git client that supports Git version 1.7.9 or later. If you do not have a Git client, you can download and install one from Git
You must attach the AWS CodeCommit hosting policy to your IAM users
You must have a SSH public / private key pair. Open the Bash simulator and create a public / private key pair using ssh-keygen
Step 2: register the SSH public key
Upload the SSH public key for your IAM users; (here the private key that matches the public key is computer generated)
After uploading your SSH public key, copy the SSH key ID
Step 3: edit the local SSH configuration
Edit the SSH configuration file named "config" in the local ~ / .ssh directory. Add the following line to the file, where the value of User is the SSH key ID that you copied in step 2.
Host git-codecommit.*.amazonaws.comUser Your-IAM-SSH-Key-ID-HereIdentityFile ~ / .ssh / Your-Private-Key-File-Name-Here
After saving the file, make sure it has the correct permissions by running the following command in the ~ / .ssh directory.
Chmod 600 config
Step 4: clone the repository
Clone the repository to the local computer and start working on the code. Run the following command:
Git clone ssh://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/airdrop
The above is all the contents of this article entitled "how to use AWS's code management tool codecommit". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.