I am new to Bit Bucket and Visual Studio Code. I gets this error
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
On fetch and checkout command. I can't even push or pull codes through VSCode. But I can do it through terminal use.
Please, help with any solutions.
Related
I am deploying my node.js app.
I am using git hooks and creating a remote repository.
In the image below you can see that i have added the remote 'adiproduction' to which i will push from my local repo.
Below i am pasting the image of content in post-receive file of hooks.
Following is the error when i try to push my code on 'adiproduction' remote.
ubuntu#35.154.65.179: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Edit:
I tried running the ssh -Tv ubuntu#35.154.65.179 command. And i got the following output.
try to run the code with "sudo"
sudo helps you to run the command with root privilege
and secondly, if you dont want use sudo so please set the ssh key on your git account, this link will helps you to set the ssh key-
'https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/'
and lastly if above solution not helps then please delete the current repository and try to clone again useing following command with ssh clone link-
git clone -b
thank you
Their is an error I have been having for awhile on ubuntu that is not allowing me to push an existing repository from the command line. this error keeps showing up. How do I fix this.
Thank you
error: chmod on /mnt/e/myproject/.git/config.lock failed: Operation not permitted
Is this disk drive NTFS?, if not, please try using sudo.
I'm trying to init a repo to download the android-x86 source. I've done it before and had no problems.
Today it keeps saying permission denied, i've reset the permissions and owner with chmod and chown, no dice.
[Errno 13] Permission denied
I've tried with and without sudo. I am the only user of the PC but it keeps refusing to init the repo. Is there a way round this without a full reinstall of ubuntu? The permissions system makes no sense to me. I am the only user, I own the folders, I own the files, permissions are set to allow read, write, execute and still I get permission denied errors.
Please help.
I am trying to clone a private GitHub repository in a server that I am trying to get up and running on a virtual machine.
No matter what I do, I keep getting the following error:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have tried a bunch of things. For starters, I made sure that I made my rsa keys correctly by following GitHub's tutorial. I am also sure that my public rsa key found at ~/.ssh/id_rsa.pub was correctly copied over to my GitHub account's ssh keys.
My config file at ~/.ssh/config looks like the following:
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
I have tried cloning a public repository and a private repository, and both don't work.
When I go to clone the repository I am executing the following command:
sudo git clone git#github.mit.edu:<GitHub Name>/<Repo Name>.git
If I execute the command without sudo, I get the following error:
fatal: could not create work tree dir '<Repo Name>'.: Permission denied
I am inside of a Python virtual environment when I do all of this. Does that make any difference?
I have been reading Stack Overflow posts related to this matter, but none of them are helping me address my issue.
Any help would be greatly appreciated! Thank you!
You are using sudo so Git is using ssh keys of user root.
To make this work you'd have to call git without sudo.
So when I don't use sudo I get the error fatal: could not create work
tree dir 'cardlearning'.: Permission denied
Make sure current user has write permission in directory you are executing the clone.
You can't clone into existing directory so as a workaround you can:
$ sudo mkdir tmp
$ sudo chown $USER: tmp
$ git clone git#github.mit.edu:<GitHub Name>/<Repo Name>.git tmp/cardlearning
$ mv tmp/cardlearning ./cardlearning
$ rmdir tmp
Check that your user has permissions to write to the directory you are in.
or execute
git clone git#github.mit.edu:<GitHub Name>/<Repo Name>.git ~/myRepo
to place it in the myRepo subdirectory of your home directory.
Do not use sudo to edit your ssh config when using a ~ referenced path, as you may end up editing the root user's ssh preferences and not your users. Likewise do not clone repositories using sudo as it will attempt to connect using the root user's ssh key.
I'm using using TortoiseCVS to access the CVS server. I get the following error:
In D:\source\foo: "C:\Program Files\CVSNT\cvs.exe" -q update -P -d
CVSROOT=:ssh:annan#foo-bar.co.uk:/home/cvsroot
cvs update: failed to create lock directory for `/home/cvsroot/foo' (/var/lock/cvs/foo/#cvs.lock): Permission denied
cvs update: failed to obtain dir lock in repository `/home/cvsroot/foo'
cvs [update aborted]: read lock failed - giving up
Error, CVS operation failed
I had this problem before and managed to fix it, however this time I've not been able to figure it out. I believe it's related to different people committing files with their own ownership.
After reading a few articles online I've tried changing /home/cvsroot and /home/cvsroot/foo to 777 permissions, and recursively changing the ownership of /home/cvsroot/ to cvs:cvs (of which I am a member).
The lock file is being created in /var/lock/cvs/foo/ you should check the permissions of that directory.
Make sure the checkout repository has the permission to checkin the files.
I have checkout the directory
cvs -d #cvs:/files/cvs co vcommon
But this rep doesnt have permission to checkin the files in the package folder.
Problem solved by checking out below:
cvs -d #cvs:/files/cvs/vcommon co package
I had an issue where my account had not been added to the "users" group. So even though permissions looked good, I still wasn't able to checkout any repositories. Once I was added to the users group, it fixed everything.