![]() Next, create a user called hitesh and set a password: Next, change the ownership of gitrepo and set proper permission with the following command:Ĭhown -R www-data:www-data /var/www/html/gitrepo ![]() Next, update the Git server information with the following command: Initialized empty Git repository in /var/www/html/gitrepo/hitesh.git/ Next, navigate to the user directory and initialize the Git repository using the following command: Next, navigate to the gitrepo and create another directory for the user: These examples assume you're cloning using HTTPS, which is recommended.Apt-get install nginx git fcgiwrap apache2-utils unzip -yĪfter installing all the packages, you can proceed to create a Git repository.įirst, a directory to store the Git repository inside the Nginx web root: It does not delete the remote repository. Removing the remote URL from your repository only unlinks the local and remote repositories. A remote name, for example, destination.The git remote rm command takes one argument: Use the git remote rm command to remove a remote URL from your repository. To solve this, either use a different remote name, or rename the original remote. This error means that the remote name you want to use already exists. > origin (push) Troubleshooting: Remote already exists You can check which remotes currently exist with the git remote -v command: $ git remote -v This error means that the old remote name you typed doesn't exist. > destination (push) Troubleshooting: Could not rename config section 'remote.' to 'remote.' # Change remote name from 'origin' to 'destination' These examples assume you're cloning using HTTPS, which is recommended. A new name for the remote, for example, destination.An existing remote name, for example, origin.The git remote rename command takes two arguments: Use the git remote rename command to rename an existing remote. This error means that the remote you tried to change doesn't exist: $ git remote set-url sofake Ĭheck that you've correctly typed the remote name. $ git remote set-url origin Verify that the remote URL has changed. Change your remote's URL from HTTPS to SSH with the git remote set-url command. ![]() You can use a credential helper so Git will remember your GitHub username and personal access token every time it talks to GitHub. For more information, see " Creating a personal access token." Password-based authentication for Git has been removed in favor of more secure authentication methods. Alternatively, you can use a credential helper like Git Credential Manager. When Git prompts you for your password, enter your personal access token. The next time you git fetch, git pull, or git push to the remote repository, you'll be asked for your GitHub username and password.
0 Comments
Leave a Reply. |