# "git@github.com: Permission denied (publickey)"

**URL:** <https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753>\
**Category:** Build Environment\
**Created:** [August 22, 2024, 2:11pm UTC](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753 "2024-08-22T14:11:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajith](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sajith/32/35525_2.png) [@sajith](https://discuss.circleci.com/u/sajith)\
**Post date:** [August 22, 2024, 2:11pm UTC](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753/1 "2024-08-22T14:11:26Z")

</div>

We at Tahoe-LAFS project has been using CircleCI for some years now. CircleCI has stopped working for us a few weeks back. Our CircleCI project is `https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-lafs`, and our GitHub project is `https://github.com/tahoe-lafs/tahoe-lafs/`.

I see two kinds of error messages. On `https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-lafs/4958/workflows/d16324ae-293d-45c8-ba97-6ac39ef4cfc4/jobs/86359`, for instance, is this one:

```auto
Warning: checkout key has zero length
Writing SSH key for checkout to "/tmp/nobody/.ssh/id_rsa"
Fetching into existing repository
Fetching from remote repository
Warning: Permanently added the ECDSA host key for IP address '140.82.112.3' to the list of known hosts.
Load key "/tmp/nobody/.ssh/id_rsa": invalid format
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

```

And `https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-lafs/4957/workflows/1b68aca6-6a7f-4cee-9df5-fa73eded9cd7/jobs/86336` has a slightly different message:

```auto
Writing SSH key for checkout to "/tmp/nobody/.ssh/id_rsa"
Writing SSH public key for checkout to "/tmp/nobody/.ssh/id_rsa.pub"
Fetching into existing repository
Fetching from remote repository
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

```

Any idea what might be going on?

I see several topics matching the error message that I’m searching for, band it seems that I will need admin access to the GitHub project to reset deploy keys. I do not have admin access to the GitHub project.

Why did CircleCI stop being able to check out all of a sudden, without any action from our part?

Tahoe-LAFS is a public project, and we do not really need CircleCI to check out using SSH. Can we get CircleCI to check out sources using HTTPS?

---

<div class="post-metadata">

**Author:** ![wyardley](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/wyardley/32/19231_2.png) [@wyardley](https://discuss.circleci.com/u/wyardley)\
**Post date:** [September 8, 2024, 9:56pm UTC](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753/2 "2024-09-08T21:56:36Z")

</div>

First thing I’d try would be to have someone who’s an org owner remove and re-add the CircleCI integration. Possibly something interfered with or removed the deploy key that the integration uses.

You can also try opening a support case in cases like this (I think even with open source projects).

---

<div class="post-metadata">

**Author:** ![wyardley](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/wyardley/32/19231_2.png) [@wyardley](https://discuss.circleci.com/u/wyardley)\
**Post date:** [September 8, 2024, 9:57pm UTC](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753/3 "2024-09-08T21:57:01Z")

</div>

> [@"git@github.com: Permission denied (publickey)." on repo that previously worked](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey-on-repo-that-previously-worked/37763/5):
>
> If you have received “[git@github.com](mailto:git@github.com): Permission denied (publickey).” Please click “project settings” button, than “SSH keys”. Click to remove deploy key and than click “add deploy key” once again. Than you can click on “${project} deploy key”, it will navigate you to github. Your new deploy key should be visible on github project page. After that checkout will succeed.

Can also try the variant mentioned here.

---

<div class="post-metadata">

**Author:** ![meejahcircleci](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/meejahcircleci/32/35819_2.png) [@meejahcircleci](https://discuss.circleci.com/u/meejahcircleci)\
**Post date:** [November 15, 2024, 7:54pm UTC](https://discuss.circleci.com/t/git-github-com-permission-denied-publickey/51753/4 "2024-11-15T19:54:00Z")

</div>

Can we not make it checkout via HTTPS? Why do we need any ssh keys at all?

(Somewhere else it was suggested to remove any that exist – for tahoe-lafs/zfec project, there are none but it’s still trying to check out via SSH instead of HTTPS)
