{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/1381","repository_url":"https://api.github.com/repos/dart-lang/pub","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/1381/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1381/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/1381/events","html_url":"https://github.com/dart-lang/pub/issues/1381","id":126763892,"number":1381,"title":"Support authenticating pub against 3rd-party servers","user":{"login":"kevmoo","id":17034,"avatar_url":"https://avatars1.githubusercontent.com/u/17034?v=3","gravatar_id":"","url":"https://api.github.com/users/kevmoo","html_url":"https://github.com/kevmoo","followers_url":"https://api.github.com/users/kevmoo/followers","following_url":"https://api.github.com/users/kevmoo/following{/other_user}","gists_url":"https://api.github.com/users/kevmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/kevmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevmoo/subscriptions","organizations_url":"https://api.github.com/users/kevmoo/orgs","repos_url":"https://api.github.com/users/kevmoo/repos","events_url":"https://api.github.com/users/kevmoo/events{/privacy}","received_events_url":"https://api.github.com/users/kevmoo/received_events","type":"User","site_admin":false},"labels":[{"id":212116418,"url":"https://api.github.com/repos/dart-lang/pub/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-01-14T22:34:24Z","updated_at":"2017-05-25T11:49:50Z","closed_at":null,"body":"We've discussed something like `pub authenticate example.com`\n\nThis would allow private pub repos to have authenticated access.\n\nWe'd also want authentication to be supported for `pub get/update`\n\nCC @computmaxer\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/303991485","html_url":"https://github.com/dart-lang/pub/issues/1381#issuecomment-303991485","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/1381","id":303991485,"user":{"login":"thosakwe","id":9996860,"avatar_url":"https://avatars1.githubusercontent.com/u/9996860?v=3","gravatar_id":"","url":"https://api.github.com/users/thosakwe","html_url":"https://github.com/thosakwe","followers_url":"https://api.github.com/users/thosakwe/followers","following_url":"https://api.github.com/users/thosakwe/following{/other_user}","gists_url":"https://api.github.com/users/thosakwe/gists{/gist_id}","starred_url":"https://api.github.com/users/thosakwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thosakwe/subscriptions","organizations_url":"https://api.github.com/users/thosakwe/orgs","repos_url":"https://api.github.com/users/thosakwe/repos","events_url":"https://api.github.com/users/thosakwe/events{/privacy}","received_events_url":"https://api.github.com/users/thosakwe/received_events","type":"User","site_admin":false},"created_at":"2017-05-25T11:49:50Z","updated_at":"2017-05-25T11:49:50Z","body":"I have a fork of pub called \"re:pub\" that supports basic auth, in addition to Google OAuth2.\r\n\r\nPerhaps users could store their basic auth credentials in a file, which could be read as follows: \r\n\r\n```yaml\r\n# .pub-auth.yaml\r\nusername: jdoe1\r\npassword: foobarbaz24\r\n```\r\n\r\nAnd then, run pub with an argument to point to the file. This is assuming the user has set a \"PUB_HOSTED_URL.\" \r\n\r\n`pub publish --auth-file .pub-auth.yaml`\r\n\r\nAnd then, perhaps users could optionally specify a host in the YAML file, so they wouldn't have to set an environment variable every time. \r\n\r\nThis design would make it possible to use dependencies from public pub, as well as publishing to a private host. \r\n\r\nHowever, there would need to be some sort of distinction made between private and normal dependencies. I think that in the \"pubspec\", private dependencies would have an extra attribute added, whereas normal ones would remain the same.\r\n\r\n```yaml\r\n# pubspec.yaml\r\ndependencies:\r\n  string_scanner: ^1.0.0 # normal\r\n  in_house_package:\r\n    hostname: https://pub.my-private-company.com\r\n    version: ^0.3.5\r\n```\r\n\r\nLet me know what you think!"}}
{"actor":{"display_login":"thosakwe"}}