mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Use --index-url in PyPi description (#22620)
				
					
				
			Fixes #22616 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -77,6 +77,8 @@ For example:
 | 
				
			|||||||
pip install --index-url https://testuser:password123@gitea.example.com/api/packages/testuser/pypi/simple --no-deps test_package
 | 
					pip install --index-url https://testuser:password123@gitea.example.com/api/packages/testuser/pypi/simple --no-deps test_package
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can use `--extra-index-url` instead of `--index-url` but that makes you vulnerable to dependency confusion attacks because `pip` checks the official PyPi repository for the package before it checks the specified custom repository. Read the `pip` docs for more information.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Supported commands
 | 
					## Supported commands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
		<div class="ui form">
 | 
							<div class="ui form">
 | 
				
			||||||
			<div class="field">
 | 
								<div class="field">
 | 
				
			||||||
				<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label>
 | 
									<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label>
 | 
				
			||||||
				<div class="markup"><pre class="code-block"><code>pip install --extra-index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}</code></pre></div>
 | 
									<div class="markup"><pre class="code-block"><code>pip install --index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}</code></pre></div>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div class="field">
 | 
								<div class="field">
 | 
				
			||||||
				<label>{{.locale.Tr "packages.pypi.documentation" | Safe}}</label>
 | 
									<label>{{.locale.Tr "packages.pypi.documentation" | Safe}}</label>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user