I have a private repo on git that I would love to import in another private repo. When I try to import it, I log in with my account and then this message Your old project requires credentials for read-only access. We will only temporarily store them for importing.
continue to pop up and I cannot import the repo. Someone could help?

- 383
- 1
- 3
- 11
4 Answers
I had the same problem and was able to resolve it by using the Personal Access Token (token access to Private Repositories) instead of the password. Take a look at this from the github community which gives a bit more detail (the answer from hobojoe1848): https://github.community/t/import-repository-not-working/2044/4

- 326
- 3
- 3
-
14Here are the steps: 1. go to https://github.com/settings/tokens 2. click on generate new token button that is located on top right 3. write any description, and preferably set it to 7 days 4. now it is generated, copy that string and go to the importing page. enter your username to the username field, and the key that you've copied to the password field. – Adnan Jun 28 '22 at 11:24
-
I already had a token that I had generated about a year ago and that worked fine also. Just username and then paste the token in instead of your normal password. – Wyatt Jan 16 '23 at 20:39
If you're importing private repo from Bitbucket to Github, you need to create a new App Password with read only access for Github to import the repo.
Steps :
- In your Bitbucket, go to "Personal settings".
- Under "Access Management", select "App passwords".
- Click "Create app password".
- Give it a label, select the relevant fields for your usage, then click "Create".
- Save the password somewhere safe & secure, because Bitbucket will never show you again.
- Use the newly created app password to import the repo on Github.
It is recommended to revoke the app password once you're done using it.

- 910
- 1
- 9
- 9
-
3This is the only answer which worked for me. I was importing from BitBucket to Github. Thanks – Marvin Thobejane Feb 13 '23 at 22:30
-
Use your bitbucket username and newly created app password for Github Repository Import from Bitbucket. – viral 9966 Feb 23 '23 at 11:53
-
3Another crucial thing to note: At step 4., "relevant" fields not only includes read access to the project but also the account (!) (I was missing account read access first - and it didnt work). At step 6. use the bitbucket username only plus the password from step 3. – hennzen Apr 07 '23 at 11:40
-
-
@hennzen, your comment helped me a lot. It should be added to the answer. Thank you! – Alexxus Jun 07 '23 at 08:24
I had the same issue.
It was resolved when I used my username for my Bitbucket account instead of my email.
I also used an app password instead of my regular password.

- 141
- 2
- 6
Use a Personal Access Token (in place of the password) - direct link to create one: https://github.com/settings/tokens/new
(Inspired by tedel's answer, but 1) the edit queue is full so I can't edit it, and 2) their link is now broken — as well as Adnan's comment).

- 902
- 1
- 11
- 11