0

I want to clone a private github repository to another device. In another question, the answer was to add username and password like this:

git clone 'https://username:password/github.com/username/repo/'

However, for me that resultet in the following error:

fatal. unable to access 'https://name:password/github.com/username/repo/': URL using bad/illegal format or missing URL

What am I doing wrong? I hope y'all can help me. Thank you!

EDIT: I marked the question as duplicate, the suggested question solved my problem.

Jannik
  • 399
  • 2
  • 5
  • 22
  • 2
    Note the `@` (not a `/`), there are also many different ways of providing credentials, in the linked question above. Good luck! – msanford Jun 04 '20 at 12:48
  • Thank you. I'll try that out. I looked through many different questions, but none of them helped me. Sorry for asking a duplicate question, I didn't see that one. – Jannik Jun 04 '20 at 13:03
  • Jannik it's alright, I have it bookmarked for my colleagues :) – msanford Jun 04 '20 at 13:11

1 Answers1

1

Try git@github.com instead of https://

if still doesnt work follow below

The following steps should work

  1. create an access token in git hub
  2. git clone https://github.com/username/repo_name.git
  3. Enter your username and use the access token as password
Sambit Nag
  • 38
  • 5
  • Thanks, the suggestions in the comments of my questions were already enough, simply replacing / with @ did it for me! – Jannik Jun 04 '20 at 13:22