Bagikan melalui


Git - Get My Git Credentials

Mengembalikan detail konfigurasi kredensial Git pengguna.
Menunjukkan bagaimana kredensial pengguna diperoleh untuk mengakses penyedia Git yang relevan, secara otomatis atau melalui koneksi yang dikonfigurasi. Jika kredensial pengguna tidak dikonfigurasi, buka Perbarui API Kredensial Git Saya .

Hak akses

Pemanggil harus memiliki kontributor atau peran ruang kerja yang lebih tinggi.

Cakupan yang Didelegasikan yang Diperlukan

Workspace.Read.All atau Workspace.ReadWrite.All

Identitas yang didukung oleh Microsoft Entra

API ini mendukung identitas Microsoft yang tercantum di bagian ini.

Identitas Dukungan
Pengguna Ya
Prinsipal Layanan dan Identitas Terkelola Ya

Antarmuka

GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/git/myGitCredentials

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
workspaceId
path True

string (uuid)

ID ruangkerja.

Respons

Nama Jenis Deskripsi
200 OK GitCredentialsConfigurationResponse:

Permintaan berhasil diselesaikan.

Other Status Codes

ErrorResponse

Kode kesalahan umum:

  • UnknownError - Terjadi kesalahan.

  • InsufficientPrivileges - Pemanggil tidak memiliki izin ruang kerja yang memadai.

  • WorkspaceNotConnectedToGit - Ruang kerja tidak tersambung ke git.

Contoh

Get the user's Git credentials configuration for Azure DevOps when it is automatic example
Get the user's Git credentials configuration when it is configured by connection example
Get the user's Git credentials configuration when it is not configured example

Get the user's Git credentials configuration for Azure DevOps when it is automatic example

Permintaan sampel

GET https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/myGitCredentials

Respon sampel

{
  "source": "Automatic"
}

Get the user's Git credentials configuration when it is configured by connection example

Permintaan sampel

GET https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/myGitCredentials

Respon sampel

{
  "source": "ConfiguredConnection",
  "connectionId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301"
}

Get the user's Git credentials configuration when it is not configured example

Permintaan sampel

GET https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/myGitCredentials

Respon sampel

{
  "source": "None"
}

Definisi

Nama Deskripsi
AutomaticGitCredentialsResponse

Kredensial Git otomatis.

ConfiguredConnectionGitCredentialsResponse

Kredensial Git koneksi yang dikonfigurasi.

ErrorRelatedResource

Objek detail sumber daya terkait kesalahan.

ErrorResponse

Respons kesalahan.

ErrorResponseDetails

Detail respons kesalahan.

GitCredentialsSource

Sumber kredensial Git. Sumber kredensial Git tambahan dapat ditambahkan dari waktu ke waktu.

NoneGitCredentialsResponse

Kredensial Git tidak dikonfigurasi.

AutomaticGitCredentialsResponse

Kredensial Git otomatis.

Nama Jenis Deskripsi
source string:

Automatic

Sumber kredensial Git.

ConfiguredConnectionGitCredentialsResponse

Kredensial Git koneksi yang dikonfigurasi.

Nama Jenis Deskripsi
connectionId

string (uuid)

ID objek koneksi.

source string:

ConfiguredConnection

Sumber kredensial Git.

ErrorRelatedResource

Objek detail sumber daya terkait kesalahan.

Nama Jenis Deskripsi
resourceId

string

ID sumber daya yang terlibat dalam kesalahan.

resourceType

string

Jenis sumber daya yang terlibat dalam kesalahan.

ErrorResponse

Respons kesalahan.

Nama Jenis Deskripsi
errorCode

string

Pengidentifikasi tertentu yang menyediakan informasi tentang kondisi kesalahan, memungkinkan komunikasi standar antara layanan kami dan penggunanya.

message

string

Representasi kesalahan yang dapat dibaca manusia.

moreDetails

ErrorResponseDetails[]

Daftar detail kesalahan tambahan.

relatedResource

ErrorRelatedResource

Detail sumber daya terkait kesalahan.

requestId

string

ID permintaan yang terkait dengan kesalahan.

ErrorResponseDetails

Detail respons kesalahan.

Nama Jenis Deskripsi
errorCode

string

Pengidentifikasi tertentu yang menyediakan informasi tentang kondisi kesalahan, memungkinkan komunikasi standar antara layanan kami dan penggunanya.

message

string

Representasi kesalahan yang dapat dibaca manusia.

relatedResource

ErrorRelatedResource

Detail sumber daya terkait kesalahan.

GitCredentialsSource

Sumber kredensial Git. Sumber kredensial Git tambahan dapat ditambahkan dari waktu ke waktu.

Nilai Deskripsi
ConfiguredConnection

Info masuk Git diperoleh melalui koneksi yang dikonfigurasi.

Automatic

Kredensial Git secara otomatis diperoleh oleh sistem, menggunakan kredensial default jika tersedia.

None

Kredensial Git tidak dikonfigurasi.

NoneGitCredentialsResponse

Kredensial Git tidak dikonfigurasi.

Nama Jenis Deskripsi
source string:

None

Sumber kredensial Git.