# Private step access fails on linux but succeeds on mac

**URL:** <https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961>\
**Category:** Builds\
**Created:** [November 25, 2020, 9:44am UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961 "2020-11-25T09:44:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![novemberfive\_ops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novemberfive_ops/32/3267_2.png) [@novemberfive\_ops](https://discuss.bitrise.io/u/novemberfive_ops)\
**Post date:** [November 25, 2020, 9:44am UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/1 "2020-11-25T09:44:17Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

Hi,

When using a private step it fails on Linux but succeeds on the Mac stack.

YML

```auto
- git::git@bitbucket.org:my_owner/my-repo.git@1.1.0:
        title: My private step

```

LINUX

````auto
you should probably use a "https://..." git clone URL,
instead of the "git@..." git clone URL which usually requires authentication
even if the repository is open source!
+------------------------------------------------------------------------------+

| (8) My private step |
+------------------------------------------------------------------------------+
| id: git@bitbucket.org:my_owner/my-repo.git... |
| version: 1.1.0 |
| collection: git |
| toolkit: bash |
| time: 2020-11-24T14:57:59Z |
+------------------------------------------------------------------------------+
| |
| |
+---+---------------------------------------------------------------+----------+
| x | My private step (exit code: 1) | 0.42 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: Not provided |
| Source: Not provided |
+---+---------------------------------------------------------------+----------+```

````

MAC  
It just works 🤷‍♂️

Any idea what’s wrong? I also tried the https:// way. Same result.  
This is currently blocking us from using the Linux stack.

Kind regards,

Seppe

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [December 4, 2020, 8:20pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/2 "2020-12-04T20:20:34Z")

</div>

Hey Seppe!

Debugging custom code is outside the scope of our normal support. We make a best effort to help, but there’s a limit to how much we can do. 🙂

In this case it’s a little hard to debug the issue when we can’t see your codebase. Is this a public repo? If so, can you share the link? I’m happy to take a look and see if I spot something.

Matthew  
Senior Customer Engineer

---

<div class="post-metadata">

**Author:** ![novemberfive\_ops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novemberfive_ops/32/3267_2.png) [@novemberfive\_ops](https://discuss.bitrise.io/u/novemberfive_ops)\
**Post date:** [December 5, 2020, 4:40pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/3 "2020-12-05T16:40:19Z")

</div>

Hi Matthew,

I don’t think it’s the script code.  
But just something wrong with access rights maybe?

If I copy the shell script and add it to a script step it works fine.  
But hosted on private bitbucket with same ssh as the cloned repo it fails (cloning works).  
It’s just weird that it fails on Linux but succeeds on Mac.

But here is the shell code anyway. This is just a basic script. But we have multiple private steps who also instant fail on linux.

```auto
set -ex

version=$(echo $BITRISE_GIT_BRANCH| sed -e 's/.*\///g')

envman add --key GIT_BRANCH_VERSION --value "$version"

```

EDIT: I just hosted the step public and everything works fine. ([https://github.com/sepperousseau/test-step](https://github.com/sepperousseau/test-step))  
The problem occurs when It’s privately hosted. You could say well just host it public.  
But for some of our scripts that’s just not possible. It’s just weird that the private step works on Mac.

Seppe

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [December 7, 2020, 4:53pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/4 "2020-12-07T16:53:06Z")

</div>

I’m investigating this right now… In the mean time, is there any reason you can’t just use our “Script” step? A custom step feels overkill for three lines of code…

---

<div class="post-metadata">

**Author:** ![novemberfive\_ops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novemberfive_ops/32/3267_2.png) [@novemberfive\_ops](https://discuss.bitrise.io/u/novemberfive_ops)\
**Post date:** [December 8, 2020, 8:32am UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/5 "2020-12-08T08:32:11Z")

</div>

Hi

I know that it is for this script 🙂  
But we have multiple python scripts running which we don’t want to share public if possible.

If it’s not possible I find a workaround. Just wondering why it doesn’t work as it should.

Thanks for help

Seppe

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [December 10, 2020, 4:54pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/6 "2020-12-10T16:54:31Z")

</div>

Hi! I’m not able to replicate the issue on this side. Would you mind sending me a couple build URL’s? One where it’s working (mac) and one where it fails (linux)? Thanks!

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [December 11, 2020, 6:25pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/7 "2020-12-11T18:25:01Z")

</div>

It looks like previously you used:

```
- git::git@bitbucket.org:appstrakt/nove-tool-bitrise-step-git-branch-version.git@1.1.0:
        title: Set git branch version
        inputs:
        - add_commit_count: "$INCREMENT_VERSION_WITH_COMMIT_COUNT"

```

Currently you’re using:

```
- git::https://bitbucket.org/appstrakt/nove-tool-bitrise-step-git-branch-versiont@1.1.0:
        title: Set git branch version
        inputs:
        - add_commit_count: "$INCREMENT_VERSION_WITH_COMMIT_COUNT"

```

Can you try switching it back and let me know if the issue persists?

---

<div class="post-metadata">

**Author:** ![novemberfive\_ops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novemberfive_ops/32/3267_2.png) [@novemberfive\_ops](https://discuss.bitrise.io/u/novemberfive_ops)\
**Post date:** [December 14, 2020, 9:04am UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/8 "2020-12-14T09:04:39Z")

</div>

> [@matthew.jones](#):
>
> - [git::git@bitbucket.org](mailto:git::git@bitbucket.org):appstrakt/nove-tool-bitrise-step-git-branch-version.git@1.1.0:

I tested both but they both fail. ☹

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [January 4, 2021, 7:06pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/9 "2021-01-04T19:06:54Z")

</div>

We’re still investigating this. I’ll post as soon as I have an update.

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [January 4, 2021, 7:41pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/10 "2021-01-04T19:41:31Z")

</div>

Hey @novemberfive_ops -

Hey, I hate to ask this but it looks like your support access either expired or was disabled. Would you mind [re-enabling it](https://devcenter.bitrise.io/troubleshooting/enabling-bitrise-support-user/)?

Matthew

Senior Customer Engineer

---

<div class="post-metadata">

**Author:** ![novemberfive\_ops](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novemberfive_ops/32/3267_2.png) [@novemberfive\_ops](https://discuss.bitrise.io/u/novemberfive_ops)\
**Post date:** [January 7, 2021, 3:10pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/11 "2021-01-07T15:10:06Z")

</div>

Done 👌

---

<div class="post-metadata">

**Author:** ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)\
**Post date:** [January 14, 2021, 5:12pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/12 "2021-01-14T17:12:53Z")

</div>

Hey @novemberfive_ops!

We’ve done some digging on this and we’re not certain as to why your steps are failing on Linux. We’re not able to replicate the problem locally.

Troubleshooting private steps is beyond the scope of normal Bitrise support. While we make a best effort to support issues like this, there’s a limit to how much we can help.

In general, rather than using private steps, we suggest using the “Script” step whenever possible.

Matthew  
Senior Customer Engineer

---

<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:** [February 13, 2021, 5:12pm UTC](https://discuss.bitrise.io/t/private-step-access-fails-on-linux-but-succeeds-on-mac/14961/13 "2021-02-13T17:12:58Z")

</div>

Closed on February 13, 2021, 5:12pm UTC

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