Andrew Fletcher published: 7 March 2022 1 minute read
Changing git push from passphrase? There are several ways to tackle this step. I'm going to focus one of these steps.
From your web directory root, look for your .git directory. Then open the .git...
cd .git
Next using your shell prompt (iTerm2), view the contents of the config file
vim config
Presently the config file looks like the following
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote "origin"] url = git@github.com:{username}/{repo}.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "origin/main"] remote = . merge = refs/heads/main [branch "main"] remote = origin merge = refs/heads/main
The line I want to focus on is the URL: url = git@github.com:{username}/{repo}.git
Backup
Before I made changes to the config file, I created a back-up of it
cp config config_bkup
Now I edited this file by changing the url line to
url = https://github.com/{username}/{repo}.git
So in context config file will now look like:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote "origin"] url = https://github.com/{username}/{repo}.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "origin/main"] remote = . merge = refs/heads/main [branch "main"] remote = origin merge = refs/heads/main
Finally I saved the file
[esc]:wq!
Test test test
Does it work? It should, but I check.
Create a commit and push.
Working!
Related articles
Andrew Fletcher
•
21 Apr 2024
This command will help you spot any unusually large directories
The red flag was when I saw the server disk space is showing a site is taking up 57992.5 MB, where locally the site size is showing 957MB. There is something serious happening here and I need to establish the problem quickly. When dealing with a significant discrepancy in site size...
Andrew Fletcher
•
05 Apr 2024
Drupal 9 to 10 upgrade an example of the actual steps taken
Continuing on from the Drupal 9 to Drupal 10 upgrade outline written earlier... Upgrading Drupal 9 to Drupal 10. However, the point of difference is this article works through the actual action steps of the upgrade.Planning and testing is critical for the Drupal to version 10 process to...
Andrew Fletcher
•
18 Mar 2024
Resolving CVE-2022-48624 less issue
To resolve the CVE-2022-48624 vulnerability on Ubuntu using Nginx, it's crucial to understand that the issue lies within the "less" package, not Nginx itself. The vulnerability affects "less" before version 606, where close_altfile in filename.c in less omits shell_quote calls for LESSCLOSE,...