# Git clone from self hosted gitlab fails with access problems

**URL:** <https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329>\
**Category:** Builds\
**Tags:** flutter\
**Created:** [March 8, 2023, 11:50am UTC](https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329 "2023-03-08T11:50:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BanzStephen](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@BanzStephen](https://discuss.bitrise.io/u/BanzStephen)\
**Post date:** [March 8, 2023, 11:50am UTC](https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329/1 "2023-03-08T11:50:05Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

I am having issues cloning project on [bitrise.io](http://bitrise.io)  
while creating the app everything goes fine, bitrise accepts the ssh key and accesses the repository and automatically detects that the project is of flutter.  
But after the setup during the first build git clone fails with

```auto
Warning: Permanently added 'gitlab.ac.net' (ED25519) to the list of known hosts.
git@gitlab.ac.net: Permission denied (public[REDACTED]).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

```

Account access on gitlab is maintainer and on bitrise is admin

Also i have to mention that I am using the same self hosted gitlab account in another bitrise account which works perfetly fine.

## Environment:

**Where did the issue happen?**

Xcode 14.2.x macOs13.2 Ventura

**Which build Step causes the issue and which version of the step?**

Git Clone v8.x.x(same with previous versions btw)

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO
- _Does the issue happen sporadically, or every time?_ : everytime
- _Does upgrading the build Step to the latest version help?_ :NO
- _When did the issue start?_ : 2023/3/8

### Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what [bitrise.io](http://bitrise.io) will get when it does a git clone in the clean environment! If possible please note which sections you tried._

I tried building locally but because of CLI it skips the clone step

---

<div class="post-metadata">

**Author:** ![BanzStephen](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@BanzStephen](https://discuss.bitrise.io/u/BanzStephen)\
**Post date:** [March 9, 2023, 11:13am UTC](https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329/2 "2023-03-09T11:13:37Z")

</div>

This was resolved after stack was changed to android, docker, ubuntu.  
The reason is still unclear but maybe the ssh file path was a problem with xcode stack??

---

<div class="post-metadata">

**Author:** ![BanzStephen](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@BanzStephen](https://discuss.bitrise.io/u/BanzStephen)\
**Post date:** [March 13, 2023, 1:40am UTC](https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329/3 "2023-03-13T01:40:13Z")

</div>

A little clarification,  
I was write in a way to change the stack but changing it to android, docker, ubuntu wasn’t

so the reason for clone failing was the type of the key.  
I had tried RSA and ECSDA keys but apprently MacOS Ventura needs ed25519 or enable RSA/SHA keys

> <https://superuser.com/questions/1749364/git-ssh-permission-denied-in-macos-13-ventura/1749370#1749370>

the following was something I found in bitrise docs but didn’t work as intended. Maybe some tuning is required

> **[Git Clone via SSH fails on Ventura VM](https://support.bitrise.io/hc/en-us/articles/14723054705043)**
>
> Issue
> 
> While trying to clone a Git repository on a Ventura virtual machine using SSH, you encounter errors like "Host key verification failed" or "no matching host key type found".
> 
> 
> 
> 
> 
> Possible so...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [April 12, 2023, 1:40am UTC](https://discuss.bitrise.io/t/git-clone-from-self-hosted-gitlab-fails-with-access-problems/22329/4 "2023-04-12T01:40:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
