Skip to content

Commit 8b69c1e

Browse files
committed
we only support git PAT for private python feeds. SAS tokens are not supported. This has been confirmed by PG several times.
1 parent cf584b0 commit 8b69c1e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/machine-learning/how-to-package-models.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,21 +230,21 @@ You can create model packages in Azure Machine Learning, using the Azure CLI or
230230

231231
## Package a model that has dependencies in private Python feeds
232232

233-
Model packages can resolve Python dependencies that are available in private feeds. To use this capability, you need to create a connection from your workspace to the feed and specify the credentials. The following Python code shows how you can configure the workspace where you're running the package operation.
233+
Model packages can resolve Python dependencies that are available in private feeds. To use this capability, you need to create a connection from your workspace to the feed and specify the PAT token configuration. The following Python code shows how you can configure the workspace where you're running the package operation.
234234

235235
```python
236236
from azure.ai.ml.entities import WorkspaceConnection
237-
from azure.ai.ml.entities import SasTokenConfiguration
237+
from azure.ai.ml.entities import PatTokenConfiguration
238238

239239
# fetching secrets from env var to secure access, these secrets can be set outside or source code
240-
python_feed_sas = os.environ["PYTHON_FEED_SAS"]
240+
git_pat = os.environ["GIT_PAT"]
241241

242-
credentials = SasTokenConfiguration(sas_token=python_feed_sas)
242+
credentials = PatTokenConfiguration(pat=git_pat)
243243

244244
ws_connection = WorkspaceConnection(
245-
name="<connection_name>",
246-
target="<python_feed_url>",
247-
type="python_feed",
245+
name="<workspace_connection_name>",
246+
target="<git_url>",
247+
type="git",
248248
credentials=credentials,
249249
)
250250

0 commit comments

Comments
 (0)