Rayn D
Rayn D

Reputation: 629

Provide access to Github private repo from machinery

I have a private git repo which I'm admin of and I want to provide machinery access (application) to it. I don't find any entry to provide some sort of token, I just see webhook and deploy keys (for deployed keys from where I should provide key? how can I generate one?), I want to generate some token and provide it that the program will have read access to it, how it could be done?

I see this be this is in scope of user but I need in scope of repository

https://blog.openshift.com/private-git-repositories-part-3-personal-access-tokens/#targetText=To%20create%20a%20personal%20access,and%20enable%20the%20repo%20checkbox.

https://github.blog/2015-06-16-read-only-deploy-keys/

I dont have the button add deployed keys as I dont have any keys yet I just have hte button add key

https://superuser.com/questions/1314064/read-only-access-to-github-repo-via-ssh-key

I try to generate with

ssh-keygen -t rsa -b 4096 -C "[email protected]"

and took the generated key and put it on keys and I got error:

Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key

Upvotes: 0

Views: 79

Answers (1)

bk2204
bk2204

Reputation: 76559

It sounds like you've pasted the private half of the key into the box, not the public half. If you're generating an RSA SSH key, your private part is likely in ~/.ssh/id_rsa and the public part is in ~/.ssh/id_rsa.pub (note the ".pub" part). If you paste the public part of the key into the box, you should be able to use the private part as normal to access the repository.

Upvotes: 1

Related Questions