Private Key Is Lost
Symptom
git clone fails because the private key is incorrect or is lost. When the key authentication fails, the system switches to password-based authentication. Since no password is configured previously, the password authentication fails, either, as shown in Figure 1.
Solution
- Log in to the CodeArts Repo service repository list page, click the alias in the upper right corner, and choose This Account Settings > SSH Keys. The page is displayed.
- On the SSH Keys page displayed, click
to delete the existing key.
- Generate a new key pair.
Run ssh-keygen -t rsa -C "abc123@***.com" to generate a key pair.
- Copy the generated public key and run cat ~/.ssh/id_rsa.pub.
Figure 2 Copying a public key
- On the SSH Keys page, click Add SSH Key. As shown below.
- On the CodeArts Repo homepage, click SSH in the Repository URL column of the repository to be cloned.
- Clone the code.
Troubleshooting FAQs
- Private Key Is Lost
- SSH Key Already Exits
- Git Keeps Asking for Passphrase During Code Clone via SSH
- Password Incorrect During Code Clone via HTTPS
- Committed Files Cannot Be Found in the Cloud Repository
- Message "pathspec XXX did not match any files" Is Displayed
- Message "Transport Error: cannot get remote repository refs. XXX.git: cannot open git-upload-pack" Is Displayed
- Message "syntax error near unexpected token `newline'" Is Displayed
- Message "unable to auto-detect email address" Is Displayed
- Message "fatal:Authentication failed" Is Displayed
- Message "'origin' does not appear to be a git repository" Is Displayed
- Message "You are not allowed to push code to protected branches on this project" is Displayed
- Message "Not a git repository" Is Displayed
- Message "src refspec master does not match any" Is Displayed
- Message "destination path 'XXX' already exists and is not an empty directory" Is Displayed
- Message "The requested URL returned error: 401" Is Displayed
- Code Push Fails
- Code Pull Fails
- Message "fatal: refusing to merge unrelated histories" Is Displayed
- Message "SSL certificate problem" Is Displayed
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more