Unable to clone other repositories in Codespaces #36228
-
I have enabled codespaces for a repository which is part of an organisation. The code depends on another repository from the same organisation. Meaning it needs to be able to clone the second repository in order to be able to function. I've read the followings:
and I ended up with the following {
"build": {
"dockerfile": "Dockerfile"
},
"name": "Flutter",
"extensions": ["Dart-Code.dart-code", "Dart-Code.flutter","auchenberg.vscode-browser-preview"],
"forwardPorts": [3000],
"customizations": {
"codespaces": {
"repositories": {
"org/repo": {
"permissions": "write-all"
}
}
}
}
} Still when I try to clone the container using either of the commands below it won't work: git clone https://github.com/org/repo.git
Cloning into 'repo'...
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/org/repo.git/': The requested URL returned error: 403 or git clone [email protected]:org/repo.git
Cloning into 'repo'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists. If I add an SSH key just like a normal machine everything works fine. But that cannot happen every time the container starts. I've tried:
I was wondering if anyone has any clue on what could possibly be the issue. Cheers. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
The problem is solved. I had to delete the container and recreate it again so that it asks for permission authorization. Not sure if there is anyway that this can be done without deleting the container. Also the SSH mode doesn't work and I have to use the HTTPS mode. |
Beta Was this translation helpful? Give feedback.
-
Hey there @aboo and thank you for asking a good question! I'm glad you found our community 🙂 |
Beta Was this translation helpful? Give feedback.
The problem is solved.
I had to delete the container and recreate it again so that it asks for permission authorization.
Not sure if there is anyway that this can be done without deleting the container.
Also the SSH mode doesn't work and I have to use the HTTPS mode.