(I have already seen other related answers in Stack Overflow, not helping, I may be missing something out)
I am getting this error after adding my SSH key to GitLab:
The form contains the following errors:
This is my key generated from command prompt :
AAAAB3NzaC1yc2EAAAADAQABAAABgQDJKcaE7AZRIpFcRkobZBVSvBSscOdgHP5I5zV0gMA2jOIxV/3lOgf8vZ7rXWld/4bBNkCREM7JXs1IFZRrfSXgC2UocDpDWwnduUx8bGsZsfH1tfLLLU42lQgqMs5Aw+3zV4vlX9NpXGqSXtUXEbxQ18B9cv43I4Wg/9af9ADi8x27+xg6/f1jjL6pTVGySMceOyM0ZBpESbjwk66n4tzWlaVmn7c6OIDwlfz0K/ky/ozIBqwpFTDD72yCMgihWZSJiR2nIlhLPVwEKld0xfnstiludFdtHvt0U8tvyZjL6pTVGySMceOyM0ZsletaOaaKN+Pvq5pGMafcZyN/uMM63QHOwSPloaV9JFQ2hbT/7D8tmxojBGSLW5PlG+A1QxxBZHGYgFpz/ooIJNrjrkc7DFcn60jaGKeuDxXNXuOXhyCz4xVWNxAB7XdCurDYI/1YuFmXFDpkUhKCZM3cFBpfRZ78ScyQ0q/kSJygnuBULgPmcmKEg3VLj6C2Cuu3hiCjs0jgX8ltCHZ61E8U=
COMMAND:
ssh-keygen -t rsa -C "taha.gh1985@gmail.com"
Make sure to copy the full public key part of what ssh-keygen
has generated.
In your case, the public key should start with ssh-rsa AAA...
.
I mentioned before a similar error, where the key was incomplete.
Note: the GitLab error message "Fingerprint sha256 has already been taken
" has been reported as "not helpful enough": issue 377357.
The same issue refers to this comment:
I got a bug report in which a user was unable to add the same deploy key to 2 separate projects.
After some time of digging around, it looks like the issue arises when the deploy key has spaces in the comment section.
After writing some simple repro code, it looks like the comment of the deploy key is being truncated after the space, making the API think it needs to re-create the ssh key, causing a failure because the fingerprint already exists.
The same thread adds, about a {"message":{"deploy_key.fingerprint_sha256":["has already been taken"]}}
error message:
I made the same mistake and someone set me straight. You do not want to add the same deploy key twice.
Add it just once then enable its use in the other projects.
In the UI, that'sSettings -> Repository -> Deploy keys -> Privately accessible ...
Then find the key and enable it.