Permission denied on Git config file - windows

I'm using Git GUI, and I was trying to create a new git repository for a folder on a remote server, which has been mapped on my Windows machine as X:/. I got following error message:
Failed to create repository
X:/blah
error: could not write config file
X:/blah/.git/config:input/output error
fatal: could not set 'core.repositoryformatversion' to '0'
I changed the permission for that folder on the remote server, but nothing changed. Any clue what was happening?
Tao

Related

git init permission denied if no access to part of the path

We've been trying to get git to work inside a windows server environment (version 2012 and 2016). It works mostly well, but our new user data storage moved to this CIFS-like shared drive (instead of local drives) and git init has permission trouble (trying this with git 2.29.2)
These are the steps to reproduce:
I have some code in this shared drive:
\\data-dist\DataVol_014\group\users\myusername\mycode\
So I navigate there with Windows file explorer and then right-click to call git bash here.
Git bash opens and then when I type git init, I get the following error:
fatal: Invalid path '//data-dist/DataVol_014/group': Permission denied
We certainly have read/write/modify access to the following levels of this path
\\data-dist\DataVol_014\group\users\myusername\mycode\
\\data-dist\DataVol_014\group\users\myusername\
\\data-dist\DataVol_014\group\users\
However, I CANNOT even view these levels:
\\data-dist\DataVol_014\group\
\\data-dist\DataVol_014\
And can ONLY view here:
\\data-dist\
Any clues how to get this to work?

Read-only permissions for Bit-Bucket server

when trying to push to BitBucket I get the following error message:
fatal: remote error: Insufficient permissions
You cannot push to XX/repository. Pushing requires write access and your
access is read-only.
Our BitBucket server does not run through ssh-keys but rather more with my account credentials and the osxkeychain. Clone and pull works perfectly and I have the error since I installed xcode, however, uninstalling xcode does not help.
I appreciate any idea!

git#heroku.com: Permission denied (publickey). fatal: Could not read from remote repository

i want to host my laravel web app in a heroku, i run the following cmd heroku login it is login with success, and then i run cmd next heroku create it runs with success and also touch Procfile it creates a Profile file and i add this web line: vendor / bin / heroku-php-apache2 web / and when i run the cmd git push heroku master i get this error.
NAJIB132#NAJIB MINGW32 /d/wamp/www/BTPl (master)
$ git push heroku master
git#heroku.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Git config command showing permission denied

I'm new to Git and repeatedly getting the following error.
When I type the command git config --global color.ui auto I get the error:
error: could not lock config file C:/Program Files/Java/jdk1.8.0_101/bin/.gitconfig: Permission denied
I have been getting the same permission denied error for other commands as well. I don't know if there is any problem with the path.
HOME should not be set to the JDK bin folder, but to your %USERPROFILE%.
Do check in a CMD session the value of your account:
set USER
You should see your username and USERPROFILE folder.
Then try the same git config command, in that CMD session, setting HOME first:
set HOME=%USERPROFILE%
I was facing permission denied for git config --global user.name command from Git bash in Windows.
I ran the Git bash with Administrator privileges and was able to resolve the error.
Note: I also got the same error from Intellij trying to commit changes; that too got resolved after running Intellij in Admin mode.
I had the same issue, trying to set the initial configuration for git - user.name and user.email and failing with a "Permission denied" error. It failed in Normal and Administrator mode and on all CLIs - PowerShell, CMD and GitBash.
The reason in my case was rather stupid. Somehow I had a ~/.gitconfig folder, rather than a file, so the CLIs were failing to create the file, due to filename conflict. Although the error message could have been more helpful.
The solution - just delete the folder and try again.

Is stash only meant for sourcetree as its not able to do it from command line in windows?

Is Stash only meant for Sourcetree, as it's not able to do it from console in windows? I have cloned the project from stash.
But I'm unable to push or pull from command prompt, whereas I can do it from Sourcetree to that particular project folder.
Error:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So is it separately treated or am I doing anything wrong in SSH key setup? Is it a mistake of source tree or Windows machine?
Last question:
How can I add multiple ssh keys for different account to it because default directory is: C:\Users\%user%\.ssh
Stash works with any git client. It looks like your command line client is not using the same SSH key as you're using from SourceTree

Resources