Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHarshit Singh
6,280 PointsHow to recover deleted git repository of local matchine
I formatted my laptop and there was a remote Git repository that was deleted now. How do I get that same repository with same Git setup again with remote access? I was trying to clone my deleted repository with git clone ssh://<user>@<ip>/path/to/your/remote/repo – but it was showing Harshits-MacBook:~ harshitsingh$ ssh-copy-id root@ip /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/harshitsingh/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys Permission denied (publickey). Harshits-MacBook:~ harshitsingh$ git clone ssh://root@ip/https://github.com/user/path Cloning into 'path'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
5 Answers
Rebekah Smith
7,263 PointsAre you using github to host your project? I found your user on github but you have no public repositories. https://github.com/harshitsingh
Rebekah Smith
7,263 PointsOkay, since you know the repository exists, the issue must be with public key. Did you use the key provided by github? It should be in Github's upper right profile icon > Settings > SSH and GPG keys
Harshit Singh
6,280 Pointsthis is my repository path https://github.com/Hsmith1947/upkarproject I already used ssh keys
Rebekah Smith
7,263 PointsWhen I want a project from github, I almost always go with the Clone with HTTPS option and then import the url, but sometimes you need to Clone with SSH. Here's a good video by Chris where he shows cloning with SSH: https://teamtreehouse.com/library/weather-app-in-need-of-tests
Harshit Singh
6,280 Pointslike this git clone ssh://root@139.59.74.230/https://github.com/Hsmith1947/upkarproject
Rebekah Smith
7,263 PointsThe ssh would look like: git clone git@github.com:Hsmith1947/upkarproject.git
If that doesn't work, I'm afraid I can't help, sorry ... there's good info here on Treehouse on using git with Java IDEs but the PHP ones don't look helpful
Harshit Singh
6,280 Pointsthank you so much for your time.
Harshit Singh
6,280 PointsHarshit Singh
6,280 Pointsthat's a not pubic project.