Git push error:git@gitlab.crio.do: Permission denied (publickey)

git@gitlab.crio.do: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

git statusOn branch master
Your branch is ahead of ‘origin/master’ by 4 commits.
(use “git push” to publish your local commits)

nothing to commit, working tree clean

Please help

I doubt your local build is failing which result in prepush hook to fail.

Can you try ./gradlew build and let me know?

Here is the latest error
Gradle build command works fine though
Please help me

Try googling stuff and be comfortable with it. Don’t be lazy :laughing: . this was the first post for this problem on google https://stackoverflow.com/questions/45177977/gradle-could-not-create-service-of-type-filehasher/46094804

@anuragq
I had already tried stackeroverflow before asking,that is why i posted here
@anand-crio.
./gradlew build runs fine
i get the error in above but when run git push with sudo it says permission denied.
Please help i am facing this issue from yesterday

I am also getting the same error

fatal: ‘origin’ does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

./gradlew build is working fine and passing all the tests.

**** Solved *****
There was an error in .git/config file
[origin] was not defined. So I copied it from QBox module and replaced QBox with Qmoney. Hence problem was solved.

I faced the same problem. I checked my build was successful. Then I tried pushing again, it worked. I don’t know what changed. :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Oh ok! that’s awesome! Is it solved now? you should have mentioned a little bit of summary of what you tried so that we wont give you those hints that you have already tried.

@anuragq still facing the same issue

can you mention what git commands you have used?

@anuragq actually i am facing this build failed issue.

@Swapnil97 change some files , add comments and then commit again

@jaypatel
I solved the error, it was related to some permissions.
Thanks for responding

1 Like

Please Close the thread

@Swapnil97 welcome bro, close the thread and mark the answer