Azure / Azure/azure-devops-cli-extension
SSH URL support for tfs repos
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
I'm trying to create a pull request to master branch, but i'm getting the error message "ERROR: must be str, not NoneType".
The problem only ocurrs when i'm using SSH Url to clone the repository. If i'm clone the repository using HTTP, works normaly.
I'm running the following command to create the pull request:
> git pr create --target-branch master
Running the same command with --debug option, i'm getting this detailed error:
```
DEBUG: Command arguments: ['code', 'pr', 'create', '--target-branch', 'master', '--debug']
DEBUG: Event: Cli.PreExecute []
DEBUG: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
DEBUG: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Event: CommandLoader.OnLoadArguments []
DEBUG: Event: CommandInvoker.OnPostCommandTableCreate []
DEBUG: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: Event: CommandInvoker.OnPreParseArgs []
DEBUG: Event: CommandInvoker.OnPostParseArgs [, ]
DEBUG: root : Remote url: ssh://MY-TFS-SERVER:22/tfs/COLLECTION/SAMPLE_PROJECT/_git/SAMPLE_PROJECT
INFO: root : Loading cache file: C:\Users\USER\.vsts\cli\cache\remotes.json
DEBUG: root : attempting to read file C:\Users\USER\.vsts\cli\cache\remotes.json as utf-8-sig
ERROR: root : must be str, not NoneType
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\code\common\pull_request.py", line 166, in create_pull_request
repo=repository)
File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\services.py", line 135, in resolve_instance_project_and_repo
git_info = get_vsts_info_from_current_remote_url()
File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\services.py", line 187, in get_vsts_info_from_current_remote_url
info = VstsGitUrlInfo(get_remote_url(VstsGitUrlInfo.is_vsts_url_candidate))
File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\vsts_git_url_info.py", line 41, in __init__
vsts_info = self.get_vsts_info(remote_url)
File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\vsts_git_url_info.py", line 67, in get_vsts_info
uri = 'https://' + netloc + '/' + components.path
TypeError: must be str, not NoneType
ERROR: must be str, not NoneType
```
thanks,
Cláudio
Contributor guide
Assessment
This issue has not been assessed yet.