Git submodule clone failure for private repository [Bitbucket]

Hi guys, hoping to get some feedback to see if I’m missing something with my build.

My build is failing on: $ git submodule update --init --recursive

The submodule is owned under the same umbrella of the main repository and both are private. On clone failure the output message is:

$ git submodule update --init --recursive
Submodule 'repo' (https://bitbucket.org/repo_org/sub_mod_repo/) registered for path 'sub_mod_repo'
Cloning into '/home/travis/build/repo_org/main_repo/sub_mod_repo'...
remote: Invalid username or password
fatal: Authentication failed for 'https://bitbucket.org/repo_org/sub_mod_repo/'
fatal: clone of 'https://bitbucket.org/repo_org/sub_mod_repo/' into submodule path '/home/travis/build/repo_org/main_repo/sub_mod_repo' failed
Failed to clone 'sub_mod_repo'. Retry scheduled

Both these repositories have ssh key access through the same key. I know the key works for the sub_mod_repo because I have a separate build for it that works fine when it is the “main repo.” Originally both were utilizing the default key travis generates and links for each repository but I updated it with a custom travis specific key. With that key I attempted each of the following steps.

  • Set the ssh travis key to full account access allowing access to all repositories under the umbrella, for each independent repo it was able to clone but when attempting to clone the sub module the above error occurred
  • Set the same ssh travis key to each repo independently, once again for each independent repo it was able to clone but when attempting to clone the sub module the above error occurred

So basically from what I am seeing is the git submodule command is not recognizing the key access.

I have the Clone or Import setting flagged on for both repos relative to the suggestion in the link below so I don’t think it is a permission issue on the travis interface side:
Travis build failed due to git submodule repository not found

List of Pages I’ve already read, referenced and tried to use:

Private Dependencies Bitbucket

  • This page has broken links (third paragraph down it tries to hyperlink to User Key which is listed on the Github page) as well as basically no useful information relative to the “Repo Key” which is the recommended method for this.

Private Dependencies Github

  • Tried to gain insight from this page since it was more complete then the bitbucket page.

Forum Post (Git submodule update –init —recursive not working after update)

  • I’ve ignored this page because the pre-build steps seems to be doing exactly this already based off the error message I put above