If you did some git command with user root
previously for some reason and now you don't have the permission with any other user, you can simplest do this.
From the root project:
cd .git/objects
As requirement, install the AWS SDK for PHP library to connect AWS S3.
First of all you need to connect to your AWS S3:
require 'vendor/autoload.php';
use Aws\S3\S3Client;
use Aws\Exception\AwsException;
In this tutorial you will see how you can create you gitlab-ci.yml
file in your repository and execute jobs on gitlab pipelines.
Amazon Linux 2 AMI
machine.gitlab-runner
. Isn't needed to be the same, just a name so you can identfy the purpose.
ED25519
To connect Amazon Ec2 Instances we need a Private Key generated while creating a particular Instance. In case, anyhow you deleted that key pair from your account or for security reasons you want to attach a new key to your Instance, then here is the step-by-step tutorial to perform the same.
Once you log in to your AWS account you will see the AWS Management Console. On the left top side, click on the Service drop Menu to select EC2. As you are on the ec2 Dashboard, scroll down and from the left side select “Key Pairs” and then click on the “Create Key Pair“.
If you don't receive any content with file_get_contents()
and curl
, like this error below:
file_get_contents('url'): failed to open stream: Permission denied
allow_url_fopen=On
in your php.ini
file. (If someone doesn't know where your php.ini file is, quick check with phpinfo() could get you everything.To remove Git from project we can remove the .git folder using the Git command.
rm -rf .git*
The Git command rm -rf is used, rm removes a file from Git, and the -rf option of this command removes files recursively and forcefully. .git* removes the folder starting with .git.
In some case, in the middle of our developlment, you have to add a new file or directory to the .gitignore
file.
How do you do that?
Well, first of all make sure that the changed files in your project are saved in a commit. Then, add your file or directory to your .gitignore
file.
Run these commands below to clear your repository cache and save again in a new commit:
git rm -r --cached .
This is a simple process with all instructions for the Development Environment on Mac OS X.
All steps will be launch in your Terminal (/Applications/Utilities/Terminal)
.
If you don't already have XCode installed, it's best to first install the command line tools as these will be used by homebrew: