Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GH-CODESPACE-CP(1)	       GitHub CLI manual	    GH-CODESPACE-CP(1)

NAME
       gh-codespace-cp - Copy files between local and remote file systems

SYNOPSIS
       gh codespace cp [-e] [-r] [-- [<scp flags>...]] <sources>... <dest>

DESCRIPTION
       The cp command copies files between the local and remote	file systems.

       As  with	 the  UNIX cp command, the first argument specifies the	source
       and the last specifies the destination; additional sources may be spec-
       ified after the first, if the destination is a directory.

       The --recursive flag is required	if any source is a directory.

       A remote: prefix	on any file name argument indicates that it refers  to
       the file	system of the remote (Codespace) machine. It is	resolved rela-
       tive to the home	directory of the remote	user.

       By default, remote file names are interpreted literally.	With the --ex-
       pand  flag,  each  such	argument is treated in the manner of scp, as a
       Bash expression to be evaluated on the remote machine, subject  to  ex-
       pansion of tildes, braces, globs, environment variables,	and backticks.
       For security, do	not use	this flag with arguments provided by untrusted
       users; see <https://lwn.net/Articles/835962/> for discussion.

       By default, the cp command will create a	public/private ssh key pair to
       authenticate with the codespace inside the ~/.ssh directory.

OPTIONS
       -c, --codespace <string>
	      Name of the codespace

       -e, --expand
	      Expand remote file names on remote shell

       -p, --profile <string>
	      Name of the SSH profile to use

       -r, --recursive
	      Recursively copy directories

       -R, --repo <string>
	      Filter codespace selection by repository name (user/repo)

       --repo-owner <string>
	      Filter codespace selection by repository owner (username or org)

EXIT CODES
       0: Successful execution

       1: Error

       2: Command canceled

       4: Authentication required

       NOTE:  Specific	commands  may have additional exit codes. Refer	to the
       command's help for more information.

EXAMPLE
       $ gh codespace cp -e README.md 'remote:/workspaces/$RepositoryName/'
       $ gh codespace cp -e 'remote:~/*.go' ./gofiles/
       $ gh codespace cp -e 'remote:/workspaces/myproj/go.{mod,sum}' ./gofiles/
       $ gh codespace cp -e -- -F ~/.ssh/codespaces_config 'remote:~/*.go' ./gofiles/

SEE ALSO
       gh-codespace(1)

				   Apr 2025		    GH-CODESPACE-CP(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gh-codespace-cp&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help