添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform .

Summary


While executing a git clone pipeline script command, one might encounter an error that displays "Too many arguments."


Too many arguments. usage: git clone [<options>] [--] <repo> [<dir>] -v, --verbose be more verbose -q, --quiet be more quiet --progress force progress reporting -n, --no-checkout don't create a checkout --bare create a bare repository --mirror create a mirror repository (implies bare) -l, --local to clone from a local repository --no-hardlinks don't use local hardlinks, always copy -s, --shared setup as shared repository --recursive initialize submodules in the clone --recurse-submodules initialize submodules in the clone --template <template-directory> directory from which templates will be used --reference <repo> reference repository --dissociate use --reference only while cloning -o, --origin <name> use <name> instead of 'origin' to track upstream -b, --branch <branch> checkout <branch> instead of the remote's HEAD -u, --upload-pack <path> path to git-upload-pack on the remote --depth <depth> create a shallow clone of that depth --single-branch clone only one branch, HEAD or --branch --separate-git-dir <gitdir> separate git dir from working tree -c, --config <key=value> set config inside the new repository


Cause

This error is usually associated with the credentials provided in the $USERNAME and $PASSWORD variables, which are often stored as a repository, workspace, or deployment variables. To resolve this issue, check if these variables contain leading or trailing spaces. Such spaces can lead to the error mentioned above.

Solution

To fix the error, make sure to remove any leading or trailing spaces from the $USERNAME and $PASSWORD variables and then save the corrected values. This adjustment should resolve the error and allow the Git clone pipeline script to execute successfully.


If you are encountering issues following this documentation - please raise a support ticket or a community support ticket for further assistance.

Description Git clone pipeline script command error "Too Many Arguments"
Product Bitbucket Cloud