feat: Add creds for GitHub auth, add "none" auth to publisher (#276)
## Motivation and Context - Adds credentials for the new MCP Registry Login GitHub Apps (local, staging, prod) - Adds support for "none" auth to publisher ## How Has This Been Tested? - Tested publisher workflows locally - Unit and integration tests passing ## Breaking Changes None ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed --- Merging based on Tadas's approval review, and only making minor docs changes on top of that.
This commit is contained in:
parent
d555acb65b
commit
e9fe6f9ab8
2 changed files with 275 additions and 113 deletions
|
|
@ -85,10 +85,10 @@ func run() error {
|
|||
log.Fatalf("failed to get anonymous token: %v", err)
|
||||
}
|
||||
|
||||
if err := os.WriteFile(".mcpregistry_token", []byte(token), 0600); err != nil {
|
||||
if err := os.WriteFile(".mcpregistry_registry_token", []byte(token), 0600); err != nil {
|
||||
log.Fatalf("failed to write token: %v", err)
|
||||
}
|
||||
defer os.Remove(".mcpregistry_token")
|
||||
defer os.Remove(".mcpregistry_registry_token")
|
||||
|
||||
return publish(examples)
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ func publish(examples []example) error {
|
|||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
cmd := exec.CommandContext(ctx, "./bin/publisher", "publish", "--mcp-file", p, "--registry-url", registryURL)
|
||||
cmd := exec.CommandContext(ctx, "./bin/publisher", "publish", "--mcp-file", p, "--registry-url", registryURL, "--auth-method", "none")
|
||||
cmd.WaitDelay = 100 * time.Millisecond
|
||||
|
||||
out, err := cmd.CombinedOutput()
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ docker build -t registry .
|
|||
|
||||
trap cleanup EXIT
|
||||
|
||||
export MCP_REGISTRY_GITHUB_CLIENT_ID=fake
|
||||
export MCP_REGISTRY_GITHUB_CLIENT_SECRET=fake
|
||||
docker compose -f docker-compose.yml -f tests/integration/docker-compose.integration-test.yml up --wait --wait-timeout 60
|
||||
|
||||
go run tests/integration/main.go
|
||||
|
|
|
|||
Loading…
Reference in a new issue