mirror of
				https://github.com/appleboy/scp-action.git
				synced 2025-10-31 16:03:47 +00:00 
			
		
		
		
	docs: improve OpenSSH setup and usage instructions
- Corrected a typo in the instructions for changing the default OpenSSH shell to git bash - Added instructions to set `tar_dereference` and `rm` variable to `true` in the YAML file - Advised against putting the `port` value through a variable - Provided guidance on converting the target path to a Unix path: `/c/path/to/target/` Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
		
							parent
							
								
									7435be3541
								
							
						
					
					
						commit
						d47d818ab7
					
				
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @ -310,16 +310,23 @@ Protecting a Private Key. The purpose of the passphrase is usually to encrypt th | |||||||
|       source: "tests/a.txt,tests/b.txt" |       source: "tests/a.txt,tests/b.txt" | ||||||
|       target: your_server_target_folder_path |       target: your_server_target_folder_path | ||||||
| ``` | ``` | ||||||
|  | 
 | ||||||
| When copying files from a Linux runner to a Windows server, you should: | When copying files from a Linux runner to a Windows server, you should: | ||||||
| 
 | 
 | ||||||
| 1.  Download git for Windows | 1. Download git for Windows | ||||||
| 2.  Change the default OpenSSH shell to git bach with the following powershell command: | 2. Change the default OpenSSH shell to git bach with the following powershell command. | ||||||
|  | 3. Set `tar_dereference` and `rm` variable to `true` in the YAML file | ||||||
|  | 4. Avoid putting the `port` value through a variable | ||||||
|  | 5. Convert the target path to a Unix path: `/c/path/to/target/` | ||||||
|  | 
 | ||||||
|  | Change the default OpenSSH shell to git bach with the following powershell command. | ||||||
|  | 
 | ||||||
| ```powershell | ```powershell | ||||||
| New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "$env:Programfiles\Git\bin\bash.exe" -PropertyType String -Force | New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "$env:Programfiles\Git\bin\bash.exe" -PropertyType String -Force | ||||||
| ``` | ``` | ||||||
| 3.  Set `tar_dereference` and `rm` variable to `true` in the YAML file | 
 | ||||||
| 4.  Avoid putting the `port` value through a variable | Convert the target path to a Unix path: `/c/path/to/target/` | ||||||
| 5.  Convert the target path to a Unix path: | 
 | ||||||
| ```diff | ```diff | ||||||
|   - name: Copy to Windows |   - name: Copy to Windows | ||||||
|       uses: appleboy/scp-action@v0.1.4 |       uses: appleboy/scp-action@v0.1.4 | ||||||
| @ -333,4 +340,4 @@ New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "$env: | |||||||
| +       target: '/c/path/to/target/' | +       target: '/c/path/to/target/' | ||||||
| +       tar_dereference: true | +       tar_dereference: true | ||||||
| +       rm: true | +       rm: true | ||||||
| ```  | ``` | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user