github - permission error - github

On our linode server, we have git installed. We can pull our development branch but not the master. We get the error below when we try and use the following command:
Command:
git remote set-url origin https://myusername#github.com/projectname/Projectname.com.git
Error:
error: could not lock config file .git/config: Permission denied
We're under pressure to launch our laravel site and cannot seem to get any further.

Related

ssh: Could not resolve hostname github.com: Temporary failure in name resolution fatal error

I get this error when I am trying to push changes up to github:
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I used to be able to push on this repo, but for some reason its giving me this error now.
When I run git remote -v it gives me this
origin git#github.com:WilliamLi10/UnigraderBackendCode.git (fetch)
origin git#github.com:WilliamLi10/UnigraderBackendCode.git (push)
I am trying to push changes up from my local repo to github, but it gives me this error.

fatal: unsafe repository is owned by someone else - GitHub actions workflow

I have two yml files configured in the GitHub actions. When new code is pushed to master, one yml file deploys the files to specific website folder, and the other one to another website folder.
Even though both websites are on the same server, one of the deploy.yml files is not executing jobs and it's throwing this error.
fatal: unsafe repository ('/var/www/yayyy.net/public_html' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /var/www/yyyy.net/public_html
Error: Process completed with exit code 128.
at this step:
- name: Add temp repo access
run: |
cd $DEV_WEBSITE_PATH
git remote set-url origin https://anything:${{ secrets.GITHUB_TOKEN }}#github.com/yyyyy/website.git
I tried adding extra step before that step and added this safe.directory command but then it's showing permission denied error.
error: could not lock config file /var/www/.gitconfig: Permission denied
Adding sudo before the command then throws this error:
sudo: sorry, you must have a tty to run sudo
I'm confused what I'm missing, can you help?
The.gitconfig did not exist and the username didn't have permission to create it. So, I created it manually and changed ownership to the username.

Github SourceTree unable to push

I've cloned github repository with SourceTree.
During installing SourceTree I've authentificated with my GutHub account.
After cloning I've made first changes and trying to commit and push. Commit works fine, but push throws exception:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
remote: Permission to KamikyIT/VkWCF.git denied to sergeypyrkin.
fatal: unable to access 'https://github.com/KamikyIT/VkWCF.git/': The requested URL returned error: 403
Pushing to https://github.com/KamikyIT/VkWCF.git
What I can see is that I am not sergeypyrkin.
Check in command-line your credential helper:
git config credential.helper
Depending on your OS, that helper might have cached the wrong credentials (wrong username/password) associated to github.com

How to fix issue when using github add, commit and then push?

I initialized a repo in my GitHub. I issued a git clone command. I went to the directory in my local computer where I wanted to clone the repo. Then I copied some files in my local drive. Then I did:
git add .
git commit
git push -u origin master
The message appeared:
remote: Permission to jasonkid1/testuli.git denied to jpamittan.
fatal: unable to access
'https://jasonkid1#github.com/jasonkid1/testuli.git/': The requested
URL returned error: 403
How can I fix this?
For any https authentication issue, you need to check your credential caching:
git config credential.helper
That is:
On Windows, for instance, you would need to open the Windows Credential Manager and check the right password was entered.
On Mac, you would need to update the OSX keychain.
You might have credentials for any github.com URL associated to jpamittan (wrong user) instead of jasonkid1.

Git Error: Remote repository could not read from

riya#RFL113:~/Documents/EventsAcross_ReactJS$ git push origin master
ERROR: Permission to RiyaKapuria/EventsAcross_ReactJS.git denied to railsfactory-riya.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exist
I'm getting this error while pushing in master. I'm having two git account in same system with two SSH Key.
I'm following https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
Can anyone help please?