How to build private rust crates in gitlab pipelines?

Private rust crates in gitlab pipeline
How to build private rust crates in gitlab pipelines?

Gitlab Pipeline setup

builder:
  stage: build
  image: dockerhub-image-url
  before_script:
    - git config --global credential.helper store
    - echo "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com" > ~/.git-credentials

Cargo.toml

[dependencies]
flasher = { git = "https://gitlab.com/org/proj/repo", branch = "branch-name" }

.cargo/config

[net]
git-fetch-with-cli = true