Private step access fails on linux but succeeds on mac

#1

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

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

LINUX

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 :man_shrugging:

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

0 Likes

#2

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. :slight_smile:

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

0 Likes

#3

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.

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)
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

0 Likes

#4

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…

0 Likes

#5

Hi

I know that it is for this script :slight_smile:
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

0 Likes

#6

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!

0 Likes

#7

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?

0 Likes

#8

I tested both but they both fail. :frowning:

0 Likes

#9

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

0 Likes

#10

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?

Matthew

Senior Customer Engineer

0 Likes

#11

Done :ok_hand:

0 Likes

#12

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

0 Likes