I want to clone repository by using following command.
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
I have got following error with this command.
dev#ubuntu:/a/WebRtc/Tools$
dev#ubuntu:/a/WebRtc/Tools$git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
dev#ubuntu:/a/WebRtc/Tools$
I have tried this in following ways:
Update git version.
Try with Ubuntu 15.10 and 14.04.4.
Try same command in windows machine, it working.
Such an error message during a clone (not a push or pull) indicates that git is not able to properly create the local repo.
See for instance "Cannot git clone to VMWare shared folder", where the impossibility to create hard-link was problematic.
Check:
if your user has the right to create file/symlink/hardlink, or
if there is some kind apparmor policy which would prevent/limit the creation of files in your setup, or
if /a/WebRTC is a mounted folder with restricted rights
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
I am trying to clone a git repository with URL: http://user#serverIP:port/RepositoryName on a Linux server and this is the output:
Cloning into 'RepositoryName'...
fatal: unable to access 'http://user#serverIP:port/RepositoryName/': couldn't connect to host
The same error also appears when I try to pull from the repository,
while it worked properly and cloned the repository on my windows machine.
Does anyone have an idea about the problem?
I have cloned a GitHub repository into a new directory on my local machine using:
git clone git#github.com:*****/project.git destination-dir
Clone worked fine but whenever I try to pull or push I git this error back:
error: insufficient permission for adding an object to repository database .git/objects
fatal: git write-tree failed to write a tree
What have I done wrong? And how can I fix this. From what I read so far online, the problem is trivial if you are using your own repository (i.e. not GitHub) but what should I do if this on GitHub (there is no ssh access).
Also, I should add that I have another directory on my machine pointing to same repository on GitHub which is fine for pulls and push.
This doesn't look like related to GitHub per-se.
From what you say in the comments, it seems that the write permissions inside the hidden .git folder (which contains all of your local git repository data) were not corresponding to the permissions that your git client had when you ran it.
It can be that you cloned the repository with one user account (or using sudo), but where trying to pull/push from a different user. If that wasn't the case, something could have messed your local files permissions while cloning.
As you stated, doing chown -R login:group projectDir/ fixed the problem because it recursively reset all permissions in your project folder (including those of the .git folder and its contents).
A good experiment would be trying to clone the same repo to a different folder to see if the problem reoccurs. If it does, maybe something is wrong with your default permission usermask and/or your git client permissions.
Problem: Need to view Git history visually in windows, repository is on remote Linux server (Ubuntu).
Question: What are two easy ways to view the git repository on remote linux server -> in Windows?
I have initially tried mirroring the remote mirror, then viewing it locally - updating when needed, but I get an error when connecting,
git clone --mirror username#serveraddress.com:/home/username/projectfolder
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Again I'm on Windows using Git Bash, trying to clone a remote repo that's on Linux.
Thanks in advance.
There is no importance where the repo resides.
As the error said,
1- make sure you have the address right
2- make sure you have access to the address
I need to checkout this libunwind port for FreeBSD,
http://people.freebsd.org/~kib/git/libunwind.git/
I've never used git before and when i tried to checkout using the command
git checkout http://people.freebsd.org/~kib/git/libunwind.git/
I get the following error,
fatal: Not a git repository (or any of the parent directories): .git
What should I do to fix this?
Following should do it:
git clone http://people.freebsd.org/~kib/git/libunwind.git/
If you are coming from svn background, read this.
You should read a basic tutorial on git before trying to use it. Git is not a centralised system. You should clone if you want to get a repository.
You're supposed to clone it, no? It will create a copy onto your system:
git clone http://people.freebsd.org/~kib/git/libunwind.git/ local-dir