zarf: Unable to pull from private repository

I’m unable to use zarf to pull code down from private git repos. From public locations it works fine.

In my zarf.yaml file I am referencing git urls that require authentication in both the repos: block and the charts: block. The tags I am referencing do exist and I am able to push and pull to these locations in my terminal without having to enter credentials every time. I am running macOS Catalina 10.15.7 with zsh.

Chart Block Error:
[zarf] zarf package create --log-level debug --confirm                                                                                                                                                                                                                                                                  master  ✭ ✱
INFO[0000] Loading dynamic config                        path=.zarf-state.yaml

       *,                                                                              
       *(((&&&&&/*.                                                                    
        *(((((%&&&&&&&*,                                                               
         *(((((((&&&&&&&&&*              ,,*****,.                      **%&&&&&(((((( 
          *(((((((((&&&&&&&@*    **@@@@@@&&&&&&&&&&@@@@@**         */&&&&&&((((((((((  
            *((((((///(&&&&&&@@@@&&&&@@@@@@@@@&&&&&&&&&&&&&&@/* *%&&&&&&/////((((((*   
              *(((///////&&&&&&&&&&&&&@@@@@@@@@&&&&&&&&&&&&&&&&&(%&&&/**///////(/*     
     */&&&&&&&&&&&&&&&&*/***&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&/*******///*         
 *&%&&&&&&&&&&&&&&&&&&&&&&&***&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&****/&&&&&&&&&&&&(/*
*/((((((((((((((///////******%%&&&&&&&&//&@@*&&&&&&&&&&&&&&&&&&&#%&&&&*/####(/////((((/.
   */((((((((((///////******%%%%%%%%%(##@@@//%&%%%%%%%&%&%%&&/(@@(/&&(***///////(((*   
        ***(((((/////********%%%%%%%/&%***/((%%%%%%%%%%%%%%%%(#&@*%/%%***/////**       
          *&&%%%%%%//*******%%%%%%%%@@****%%/%%%%%%%%%%%%%%%%%%***@@%%**(%%%&&*        
        *&&%%%%%(////******/(%%%%%%%@@@**@@&%%%%%%%%%%%%%%%%%(@@*%@@%%*****////%&*     
      *&%%%%%#////////***/////%%%%%%*@@@@@/%%%%%%%%%%%%%%%%%%%%@@@@%%*****///////((*   
     *%%%%((((///////*    *////(%%%%%%##%%%%%%%%%%%(%%%%*%%%%%%%%%%%*                  
    *(((((((/***            */////#%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%#*                   
                 %%(           ,*///((%%%%%%%%(**/#%%%##**/%%%%%*                      
               %%%&&&&           *///*/(((((########//######**                         
               %&&&&&*          *#######(((((((//////((((*                             
                                ###%##############(((#####*                            
                 %@&&          *&#(%######*#########(#####/                            
                 /&&* ..       ,&#(/%####(*#########/#####/             #%@%&&&        
           **         &&     ./%##((*&####/(#######(#####*(*            %&&&&&&        
         *@%%@*             *&#####((((####*(#####(*###(*(##*              ,  %@&      
        *@%%%%*            *%######((((*%####/*((*%####/*(###*  *                      
       *@%%%%%%*      *##* **#(###((((///#*#*(((((/#**#((*(##**#,*/##*,    %@&&        
       *@%%%*%%%*  ****,*##/*#*##(((((((/(((((((((/(((*(((((###########*,  #&&#        
       *@%%%*(%%%/*   **######(#((..((((((((((((((((((*  ,*(#####(((((*,               
       *@%%%#(*%%%%*   ,**/####(* */(((((((((((((((((*     ,**,                        
        *@%%%*(/(%%%%/*     ******(((((((((((*(((((*                                   
         *@%%%#(((*/%%%%%%##%%*((((((((((((**((((*                                     
          *@%%%%*(((((((((((((((((((((((*/%*((*.             (&&&(                     
           ,*%%%%%%*((((((((((((((((**%%%**,                (&                         
              *%%%%%%%%%(/*****(#%%%%%**                      &%                       
                 ,**%%%%%%%%%%%%%***                                                   
                                                                                       
           ,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((,          
                       .....(((((((/////////////////((((((((.....                      
                                                                                       
          ///////////////      ///////      *****************  ***************,        
                  ////.       ///  ////     *///          ***  ****                    
               ////,         ///    ////    *///////////////.  /////**/******          
            /////          //////////////   *///      *///     ///*                    
         ./////////////// ////         ///  *///        ////   ///*                    
                                                                                       


The log level has been changed to: debug
INFO[0000] Loading dynamic config                        path=zarf.yaml
INFO[0000] Creating temp path                            path=/var/folders/5y/ghfp52gs4vd03xqg6m6cxk3rqsy1tr/T/zarf-289154503


kind: ZarfPackageConfig
metadata:
name: gitops
description: Zarf gitops bootstrap
build:
terminal: macb
user: userz
timestamp: Mon, 31 Jan 2022 09:50:51 -0800
string:  v0.14.0
components:
- name: init-azure-landing-zone
description: Staging Azure BigBang deployment
required: true
manifests: manifests
images:
- registry1.dso.mil/ironbank/microsoft/azure/mission-landing-zone:mlz-v2021.12.0
charts:
- name: twistlock
  url: https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git
  version: 0.1.0-dsop.1


INFO[0000] Create Zarf package confirmed                
INFO[0000] Loading component assets                      component=init-azure-landing-zone
INFO[0000] Loading static helm charts                   
INFO[0000] Processing git-based helm chart               Chart=twistlock URL="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git" Version=0.1.0-dsop.1
INFO[0000] Creating temp path                            path=/var/folders/5y/ghfp52gs4vd03xqg6m6cxk3rqsy1tr/T/zarf-827419258
INFO[0000] Processing git repo                           Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git"
DEBU[0000] authentication required                       Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git"
FATA[0000] Not a valid git repo or unable to clone       Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git"
Repos Block Error:

[zarf] zarf package create --log-level debug                                                                                                                                                                                                                                                                            master  ✭ ✱
INFO[0000] Loading dynamic config                        path=.zarf-state.yaml

         *,                                                                              
         *(((&&&&&/*.                                                                    
          *(((((%&&&&&&&*,                                                               
           *(((((((&&&&&&&&&*              ,,*****,.                      **%&&&&&(((((( 
            *(((((((((&&&&&&&@*    **@@@@@@&&&&&&&&&&@@@@@**         */&&&&&&((((((((((  
              *((((((///(&&&&&&@@@@&&&&@@@@@@@@@&&&&&&&&&&&&&&@/* *%&&&&&&/////((((((*   
                *(((///////&&&&&&&&&&&&&@@@@@@@@@&&&&&&&&&&&&&&&&&(%&&&/**///////(/*     
       */&&&&&&&&&&&&&&&&*/***&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&/*******///*         
   *&%&&&&&&&&&&&&&&&&&&&&&&&***&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&****/&&&&&&&&&&&&(/*
 */((((((((((((((///////******%%&&&&&&&&//&@@*&&&&&&&&&&&&&&&&&&&#%&&&&*/####(/////((((/.
     */((((((((((///////******%%%%%%%%%(##@@@//%&%%%%%%%&%&%%&&/(@@(/&&(***///////(((*   
          ***(((((/////********%%%%%%%/&%***/((%%%%%%%%%%%%%%%%(#&@*%/%%***/////**       
            *&&%%%%%%//*******%%%%%%%%@@****%%/%%%%%%%%%%%%%%%%%%***@@%%**(%%%&&*        
          *&&%%%%%(////******/(%%%%%%%@@@**@@&%%%%%%%%%%%%%%%%%(@@*%@@%%*****////%&*     
        *&%%%%%#////////***/////%%%%%%*@@@@@/%%%%%%%%%%%%%%%%%%%%@@@@%%*****///////((*   
       *%%%%((((///////*    *////(%%%%%%##%%%%%%%%%%%(%%%%*%%%%%%%%%%%*                  
      *(((((((/***            */////#%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%#*                   
                   %%(           ,*///((%%%%%%%%(**/#%%%##**/%%%%%*                      
                 %%%&&&&           *///*/(((((########//######**                         
                 %&&&&&*          *#######(((((((//////((((*                             
                                  ###%##############(((#####*                            
                   %@&&          *&#(%######*#########(#####/                            
                   /&&* ..       ,&#(/%####(*#########/#####/             #%@%&&&        
             **         &&     ./%##((*&####/(#######(#####*(*            %&&&&&&        
           *@%%@*             *&#####((((####*(#####(*###(*(##*              ,  %@&      
          *@%%%%*            *%######((((*%####/*((*%####/*(###*  *                      
         *@%%%%%%*      *##* **#(###((((///#*#*(((((/#**#((*(##**#,*/##*,    %@&&        
         *@%%%*%%%*  ****,*##/*#*##(((((((/(((((((((/(((*(((((###########*,  #&&#        
         *@%%%*(%%%/*   **######(#((..((((((((((((((((((*  ,*(#####(((((*,               
         *@%%%#(*%%%%*   ,**/####(* */(((((((((((((((((*     ,**,                        
          *@%%%*(/(%%%%/*     ******(((((((((((*(((((*                                   
           *@%%%#(((*/%%%%%%##%%*((((((((((((**((((*                                     
            *@%%%%*(((((((((((((((((((((((*/%*((*.             (&&&(                     
             ,*%%%%%%*((((((((((((((((**%%%**,                (&                         
                *%%%%%%%%%(/*****(#%%%%%**                      &%                       
                   ,**%%%%%%%%%%%%%***                                                   
                                                                                         
             ,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((,          
                         .....(((((((/////////////////((((((((.....                      
                                                                                         
            ///////////////      ///////      *****************  ***************,        
                    ////.       ///  ////     *///          ***  ****                    
                 ////,         ///    ////    *///////////////.  /////**/******          
              /////          //////////////   *///      *///     ///*                    
           ./////////////// ////         ///  *///        ////   ///*                    
                                                                                         


The log level has been changed to: debug
INFO[0000] Loading dynamic config                        path=zarf.yaml
INFO[0000] Creating temp path                            path=/var/folders/5y/ghfp52gs4vd03xqg6m6cxk3rqsy1tr/T/zarf-920840629


kind: ZarfPackageConfig
metadata:
  name: dsop-gitops
  description: Zarf gitops bootstrap
build:
  terminal: macb
  user: userz
  timestamp: Mon, 31 Jan 2022 10:13:57 -0800
  string:  v0.14.0
components:
- name: dsop-gitops-baseline
  description: Stage containers in local docker registry and code in gitea for BigBang deployment
  required: true
  repos:
  - https://repo1.dso.mil/platform-one/big-bang/bigbang.git@1.17.0
  - https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git@0.0.6-bb.1


? Create this Zarf package? Yes
INFO[0001] Loading component assets                      component=dsop-gitops-baseline
INFO[0001] loading git repos for gitops service transfer 
INFO[0001] Processing git repo                           Remote="https://repo1.dso.mil/platform-one/big-bang/bigbang.git@1.17.0"
Enumerating objects: 23491, done.
Counting objects: 100% (3464/3464), done.
Compressing objects: 100% (690/690), done.
Total 23491 (delta 3282), reused 2786 (delta 2772), pack-reused 20027
DEBU[0005] Attempting to find tag: 1.17.0                Remote="https://repo1.dso.mil/platform-one/big-bang/bigbang.git"
INFO[0005] Git tag fetched                               Remote="https://repo1.dso.mil/platform-one/big-bang/bigbang.git"
INFO[0005] Branch deleted                                Repo=/var/folders/5y/ghfp52gs4vd03xqg6m6cxk3rqsy1tr/T/zarf-920840629/components/dsop-gitops-baseline/repos/mirror__repo1.dso.mil__platform-one__big-bang__bigbang.git__1.17.0
INFO[0007] Git repo synced                               Remote="https://repo1.dso.mil/platform-one/big-bang/bigbang.git@1.17.0"
INFO[0007] Processing git repo                           Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git@0.0.6-bb.1"
DEBU[0007] authentication required                       Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git@0.0.6-bb.1"
FATA[0007] Not a valid git repo or unable to clone       Remote="https://repo1.dso.mil/privategroup/privatesub/bigbang/packages/twistlock.git@0.0.6-bb.1"

Thanks in advance

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

So I did not need to add a tag to target the specific tag in the credentials file. just the base url, at least for my github test. I don’t have permissions to create repo’s or private repo’s in repo1 so I am not able to verify. For my test I was able to just add https://USER_NAME:AUTH_TOKEN@github.com to the credentials file, and then I was still able to target and build successfully when targeting a specific release tag with the zarf.yaml.

This worked for me. Created a ~/.git-credentials file - first line is https://USER_NAME:AUTH_TOKEN@repo1.dso.mil

@mike-winberry is looking into it on our end. Let us know if you’re able to confirm it? If so I’ll get this written up as a bug including a story/outcome that is testable by the E2E testing suite

dang and git cloning like normal for the repo works fine on the same machine?